--- /dev/null
- * Copyright (C) 2003-2008 Polytechnique.org *
+<?php
+/***************************************************************************
++ * Copyright (C) 2003-2009 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+function education_options($current = 0)
+{
+ $html = '<option value="-1"></option>';
+ $res = XDB::iterator("SELECT e.id AS id, g.pays AS country,
+ IF(CHAR_LENGTH(e.name) > 76, e.abbreviation, e.name) AS name
+ FROM profile_education_enum AS e
+ LEFT JOIN geoloc_pays AS g ON (e.country = g.a2)
+ WHERE EXISTS (SELECT *
+ FROM profile_education_degree AS d
+ WHERE e.id = d.eduid)
+ ORDER BY g.pays, e.name");
+ $country = "";
+ while ($arr_edu = $res->next()) {
+ if ($arr_edu["country"] != $country) {
+ $country = $arr_edu["country"];
+ $html .= "<optgroup label=" . $country . ">";
+ }
+ $html .= '<option value="' . $arr_edu["id"] . '"';
+ if ($arr_edu["id"] == $current) {
+ $html .= " selected='selected'";
+ }
+ $html .= '>' . htmlspecialchars($arr_edu["name"]) . "</option>\n";
+ }
+ return $html;
+}
+
+/** pour appeller education_options depuis smarty
+ */
+function _education_options_smarty($params)
+{
+ if(!isset($params['selected'])) {
+ $params['selected'] = 0;
+ }
+ return education_options($params['selected']);
+}
+Platal::page()->register_function('education_options', '_education_options_smarty');
+
+/** affiche un Array javascript contenant les diplômes de chaque formation
+ */
+function education_degree()
+{
+ $html = "";
+ $res = XDB::iterRow("SELECT d.eduid, d.degreeid
+ FROM profile_education_enum AS e
+ INNER JOIN profile_education_degree AS d ON (e.id = d.eduid)
+ LEFT JOIN geoloc_pays AS g ON (e.country = g.a2)
+ ORDER BY g.pays, e.name");
+ if ($edu_degree = $res->next()) {
+ $eduid = $edu_degree['0'];
+ $html .= "[";
+ $html .= $edu_degree['1'];
+ $edu_degree = $res->next();
+ while ($edu_degree['0'] == $eduid) {
+ $html .= "," . $edu_degree['1'];
+ $edu_degree = $res->next();
+ }
+ $html .= "]";
+ }
+ while ($edu_degree) {
+ $eduid = $edu_degree['0'];
+ $html .= ",\n[";
+ $html .= $edu_degree['1'];
+ $edu_degree = $res->next();
+ while ($edu_degree['0'] == $eduid) {
+ $html .= "," . $edu_degree['1'];
+ $edu_degree = $res->next();
+ }
+ $html .= "]";
+ }
+ return $html;
+}
+Platal::page()->register_function('education_degree', 'education_degree');
+
+/** affiche tous les types possibles de diplômes
+ */
+function education_degree_all()
+{
+ $res = XDB::query("SELECT id
+ FROM profile_education_degree_enum
+ ORDER BY id");
+ return implode(',', $res->fetchColumn());
+}
+Platal::page()->register_function('education_degree_all', 'education_degree_all');
+
+/** affiche les noms de tous les diplômes possibles
+ */
+function education_degree_name()
+{
+ $res = XDB::query("SELECT degree
+ FROM profile_education_degree_enum
+ ORDER BY id");
+ return '"' . implode('","', $res->fetchColumn()) . '"';
+}
+Platal::page()->register_function('education_degree_name', 'education_degree_name');
+
+/** formatte une formation pour l'affichage
+ */
+function education_fmt($name, $url, $degree, $grad_year, $field, $program, $sexe, $long)
+{
+ $field = strtolower($field);
+ $txt = "";
+
+ if ($grad_year || $field || $program) {
+ $txt .= "<span title=\"(";
+ if ($program) {
+ $txt .= $program;
+ if ($grad_year || $field) {
+ $txt .= ", ";
+ }
+ }
+ if ($grad_year) {
+ if ($sexe) {
+ $txt .= "diplômée en $grad_year";
+ } else {
+ $txt .= "diplômé en $grad_year";
+ }
+ if ($field) {
+ $txt .= ", ";
+ }
+ }
+ if ($field) {
+ $txt .= "domaine : $field)\">";
+ }
+ }
+
+ if (($degree != "Lic.") || ($long)) {
+ if (($degree != "Ing.") && ($degree != "Dipl.")) {
+ $txt .= $degree;
+ }
+ if ($name) {
+ $txt .= ' ';
+ }
+ if ($url != ' ') {
+ $txt .= "<a href=\"$url\" onclick=\"return popup(this)\">$name</a>";
+ } else {
+ $txt .= $name;
+ }
+ }
+ $txt .= "</span>";
+
+ return $txt;
+}
+
+function _education_fmt($params, &$smarty)
+{
+ extract($params);
+ return education_fmt($name, $url, $degree, $grad_year, $field, $program, $sexe, $long);
+}
+Platal::page()->register_function('education_fmt', '_education_fmt');
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
+?>
--- /dev/null
- * Copyright (C) 2003-2008 Polytechnique.org *
+<?php
+/***************************************************************************
++ * Copyright (C) 2003-2009 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+function fill_email_combobox(PlPage& $page)
+{
+ global $globals;
+
+ $user = S::user();
+ $email_type = "directory";
+
+ $res = XDB::query(
+ "SELECT email_directory
+ FROM profile_directory
+ WHERE uid = {?}", $user->id());
+ $email_directory = $res->fetchOneCell();
+ if ($email_directory) {
+ $page->assign('email_directory', $email_directory);
+ list($alias, $domain) = explode('@', $email_directory);
+ } else {
+ $page->assign('email_directory', '');
+ $email_type = NULL;
+ $alias = $domain = '';
+ }
+
+ $res = XDB::query(
+ "SELECT alias
+ FROM virtual
+ INNER JOIN virtual_redirect USING(vid)
+ WHERE (redirect = {?} OR redirect = {?})
+ AND alias LIKE '%@{$globals->mail->alias_dom}'",
+ $user->forlifeEmail(),
+ // TODO: remove this über-ugly hack. The issue is that you need
+ // to remove all @m4x.org addresses in virtual_redirect first.
+ $user->login() . '@' . $globals->mail->domain2);
+ $melix = $res->fetchOneCell();
+ if ($melix) {
+ list($melix) = explode('@', $melix);
+ $page->assign('melix', $melix);
+ if (($domain == $globals->mail->alias_dom) || ($domain == $globals->mail->alias_dom2)) {
+ $email_type = "melix";
+ }
+ }
+
+ $res = XDB::query(
+ "SELECT alias
+ FROM aliases
+ WHERE id={?} AND (type='a_vie' OR type='alias')", $user->id());
+ $res = $res->fetchAllAssoc();
+ $page->assign('list_email_X', $res);
+ if (($domain == $globals->mail->domain) || ($domain == $globals->mail->domain2)) {
+ foreach ($res as $res_it) {
+ if ($alias == $res_it['alias']) {
+ $email_type = "X";
+ }
+ }
+ }
+
+ require_once 'emails.inc.php';
+ $redirect = new Redirect($user);
+ $redir = array();
+ foreach ($redirect->emails as $redirect_it) {
+ if ($redirect_it instanceof EmailRedirection) {
+ $redir[] = $redirect_it->email;
+ if ($email_directory == $redirect_it->email) {
+ $email_type = "redir";
+ }
+ }
+ }
+ $page->assign('list_email_redir', $redir);
+
+ $res = XDB::query(
+ "SELECT email
+ FROM profile_job
+ WHERE uid = {?}", $user->id());
+ $res = $res->fetchAllAssoc();
+ $pro = array();
+ foreach ($res as $res_it) {
+ if ($res_it['email'] != '') {
+ $pro[] = $res_it['email'];
+ if ($email_directory == $res_it['email']) {
+ $email_type = "pro";
+ }
+ }
+ }
+ $page->assign('list_email_pro', $pro);
+
+ $page->assign('email_type', $email_type);
+}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
+?>
--- /dev/null
- * Copyright (C) 2003-2008 Polytechnique.org *
+<?php
+/***************************************************************************
++ * Copyright (C) 2003-2009 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+function build_names_display($data)
+{
+ $data_array = explode(';;', $data);
+ $n = count($data_array);
+ $n--;
+ for ($i = 0; $i < $n; $i++) {
+ $searchname = explode(';', $data_array[$i]);
+ if ($searchname[1] != 0) {
+ list($particle, $name) = explode(' ', $searchname[2], 2);
+ if (!$name) {
+ list($particle, $name) = explode('\'', $searchname[2], 2);
+ }
+ } else {
+ $particle = '';
+ $name = $searchname[2];
+ }
+ if (!isset($search_names[$searchname[0]])) {
+ $search_names[$searchname[0]] = array($searchname[2], $name);
+ } else {
+ $search_names[$searchname[0]] = array_merge($search_names[$searchname[0]], array($name));
+ }
+ }
+ $sn_types_public = build_types('public');
+ $sn_types_private = build_types('private');
+ $full_name = build_full_name($search_names, $sn_types_public);
+ return build_public_name($search_names, $sn_types_public, $full_name) . ';' .
+ build_private_name($search_names, $sn_types_private);
+}
+
+function build_types($pub)
+{
+ if ($pub == 'public') {
+ $sql_pub = "AND FIND_IN_SET('public', flags)";
+ } elseif ($pub == 'private') {
+ $sql_pub = "AND NOT FIND_IN_SET('public', flags)";
+ } else {
+ $sql_pub = "";
+ }
+ $sql = "SELECT id, name
+ FROM profile_name_search_enum
+ WHERE NOT FIND_IN_SET('not_displayed', flags)" . $sql_pub;
+ $sn_types = XDB::iterator($sql);
+ $types = array();
+ while ($sn_type = $sn_types->next()) {
+ $types[$sn_type['name']] = $sn_type['id'];
+ }
+ return $types;
+}
+
+function build_full_name(&$search_names, &$sn_types)
+{
+ $name = "";
+ if (isset($search_names[$sn_types['Nom usuel']])) {
+ $name .= $search_names[$sn_types['Nom usuel']][0] . " ("
+ . $search_names[$sn_types['Nom patronymique']][0] . ")";
+ } else {
+ $name .= $search_names[$sn_types['Nom patronymique']][0];
+ }
+ if (isset($search_names[$sn_types['Nom marital']])
+ || isset($search_names[$sn_types['Pseudonyme (nom de plume)']])) {
+ if (isset($search_names[$sn_types['Nom marital']])) {
+ $user = S::user();
+ if ($user->isFemale()) {
+ $name .= " (Mme ";
+ } else {
+ $name .= " (M ";
+ }
+ $name .= $search_names[$sn_types['Nom marital']][0];
+ if (isset($search_names[$sn_types['Pseudonyme (nom de plume)']])) {
+ $name .= ", ";
+ }
+ }
+ if (isset($search_names[$sn_types['Pseudonyme (nom de plume)']])) {
+ $name .= $search_names[$sn_types['Pseudonyme (nom de plume)']][0];
+ }
+ $name .= ")";
+ }
+ return $name;
+}
+
+function build_public_name(&$search_names, &$sn_types, $full_name)
+{
+ return $search_names[$sn_types['Prénom']][0] . " " . $full_name;
+}
+
+function build_private_name(&$search_names, &$sn_types)
+{
+ $name = "";
+ if (isset($search_names[$sn_types['Surnom']])
+ || (isset($search_names[$sn_types['Autre prénom']])
+ || isset($search_names[$sn_types['Autre nom']]))) {
+ $name .= " (";
+ if (isset($search_names[$sn_types['Surnom']])) {
+ $name .= "alias " . $search_names[$sn_types['Surnom']][0];
+ $i = 2;
+ while (isset($search_names[$sn_types['Surnom']][$i])) {
+ $name .= ", " . $search_names[$sn_types['Surnom']][$i];
+ $i++;
+ }
+ if (isset($search_names[$sn_types['Autre prénom']])
+ || isset($search_names[$sn_types['Autre nom']])) {
+ $name .= ", ";
+ }
+ }
+ if (isset($search_names[$sn_types['Autre prénom']])) {
+ $name .= "autres prénoms : " . $search_names[$sn_types['Autre prénom']][0];
+ $i = 2;
+ while (isset($search_names[$sn_types['Autre prénom']][$i])) {
+ $name .= ", " . $search_names[$sn_types['Autre prénom']][$i];
+ $i++;
+ }
+ if (isset($search_names[$sn_types['Autre nom']])) {
+ $name .= ", ";
+ }
+ }
+ if (isset($search_names[$sn_types['Autre nom']])) {
+ $name .= "autres noms : " . $search_names[$sn_types['Autre nom']][0];
+ $i = 2;
+ while (isset($search_names[$sn_types['Autre nom']][$i])) {
+ $name .= ", " . $search_names[$sn_types['Autre nom']][$i];
+ $i++;
+ }
+ }
+ $name .= ")";
+ }
+ return $name;
+}
+
+function build_directory_name(&$search_names, &$sn_types, $full_name)
+{
+ return $full_name . " " . $search_names[$sn_types['Prénom']][0];
+}
+
+function short_name(&$search_names, &$sn_types)
+{
+ $name = "";
+ if (isset($search_names[$sn_types['Nom usuel']])) {
+ $name .= $search_names[$sn_types['Nom usuel']][0];
+ } else {
+ $name .= $search_names[$sn_types['Nom patronymique']][0];
+ }
+ $name = " ";
+ if (isset($search_names[$sn_types['Prénom usuel']])) {
+ $name .= $search_names[$sn_types['Prénom usuel']][0];
+ } else {
+ $name .= $search_names[$sn_types['Prénom']][0];
+ }
+ return $name;
+}
+
+function sort_name(&$search_names, &$sn_types)
+{
+ $name = "";
+ if (isset($search_names[$sn_types['Nom usuel']])) {
+ $name .= $search_names[$sn_types['Nom usuel']][1];
+ } else {
+ $name .= $search_names[$sn_types['Nom patronymique']][1];
+ }
+ $name .= $search_names[$sn_types['Prénom']][0];
+ return $name;
+}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
+?>
--- /dev/null
- * Copyright (C) 2003-2008 Polytechnique.org *
+<?php
+/***************************************************************************
++ * Copyright (C) 2003-2009 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+// {{{ class EntrReq
+
+class EntrReq extends Validate
+{
+ // {{{ properties
+
+ public $id;
+ public $name;
+ public $acronym;
+ public $url;
+ public $email;
+ public $holdingid;
+ public $NAF_code;
+ public $AX_code;
+
+ public $tel;
+ public $fax;
+
+ public $suggestions;
+ //TODO: addresses
+
+ // }}}
+ // {{{ constructor
+
+ public function __construct(User &$_user, $_id, $_name, $_acronym, $_url, $_email, $_tel, $_fax, $_stamp = 0)
+ {
+ parent::__construct($_user, false, 'entreprise', $_stamp);
+ $this->id = $_id;
+ $this->name = $_name;
+ $this->acronym = $_acronym;
+ $this->url = $_url;
+ $this->email = $_email;
+ $this->tel = $_tel;
+ $this->fax = $_fax;
+
+ $_name = preg_replace('/[^0-9a-z]/i', ' ', strtolower(replace_accent($_name)));
+ $name = explode(" ", $_name);
+ $name_array = array_map("trim", $name);
+ $length = count($name_array);
+ $where = "";
+ for ($i = 0; $i < $length; $i++) {
+ if (strlen($name_array[$i]) > 2) {
+ if ($where !== "") {
+ $where .= " OR ";
+ }
+ $where .= "name LIKE '%" . $name_array[$i] . "%'";
+ }
+ }
+ $res = XDB::iterator("SELECT name
+ FROM profile_job_enum
+ WHERE "
+ . $where);
+ $this->suggestions = "| ";
+ while ($sug = $res->next()) {
+ $this->suggestions .= $sug['name'] . " | ";
+ }
+ }
+
+ // }}}
+ // {{{ function formu()
+
+ public function formu()
+ {
+ return 'include/form.valid.entreprises.tpl';
+ }
+
+ // }}}
+ // {{{ function editor()
+
+ public function editor()
+ {
+ return 'include/form.valid.edit-entreprises.tpl';
+ }
+
+ // }}}
+ // {{{ function handle_editor()
+
+ protected function handle_editor()
+ {
+ if (Env::has('holdingid')) {
+ $this->holdingid = trim(Env::v('holdingid'));
+ }
+ if (Env::has('name')) {
+ $this->name = trim(Env::v('name'));
+ if (Env::has('acronym')) {
+ $this->acronym = trim(Env::v('acronym'));
+ if (Env::has('url')) {
+ $this->url = trim(Env::v('url'));
+ if (Env::has('NAF_code')) {
+ $this->NAF_code = trim(Env::v('NAF_code'));
+ if (Env::has('AX_code')) {
+ $this->AX_code = trim(Env::v('AX_code'));
+ return true;
+ }
+ }
+ }
+ }
+ }
+ return false;
+ }
+
+ // }}}
+ // {{{ function _mail_subj
+
+ protected function _mail_subj()
+ {
+ return "[Polytechnique.org/Entreprises] Demande d'ajout d'une entreprise : " . $this->name;
+ }
+
+ // }}}
+ // {{{ function _mail_body
+
+ protected function _mail_body($isok)
+ {
+ if ($isok) {
+ return " L'entreprise " . $this->name . " vient d'être ajoutée à ta fiche.";
+ } else {
+ return " La demande que tu avais faite pour l'entreprise " . $this->name .
+ " a été refusée, car elle figure déjà dans notre base.";
+ }
+ }
+
+ // }}}
+ // {{{ function commit()
+
+ public function commit()
+ {
+ $res = XDB::query('SELECT id
+ FROM profile_job_enum
+ WHERE name = {?}',
+ $this->name);
+ if ($res->numRows() != 1) {
+ require_once("profil.func.inc.php");
+
+ XDB::execute('INSERT INTO profile_job_enum (name, acronym, url, email, holdingid, NAF_code, AX_code)
+ VALUES ({?}, {?}, {?}, {?}, {?}, {?}, {?})',
+ $this->name, $this->acronym, $this->url, $this->email,
+ $this->holdingid, $this->NAF_code, $this->AX_code);
+ $jobid = XDB::insertId();
+ $display_tel = format_display_number($this->tel, $error_tel);
+ $display_fax =format_display_number($this->fax, $error_fax);
+ XDB::execute('INSERT INTO profile_phones (uid, link_type, link_id, tel_id, tel_type,
+ search_tel, display_tel, pub)
+ VALUES ({?}, {?}, {?}, {?}, {?}, {?}, {?}, {?}),
+ ({?}, {?}, {?}, {?}, {?}, {?}, {?}, {?})',
+ $jobid, 'hq', $this->id, 0, 'fixed', format_phone_number($this->tel), $display_tel, 'public',
+ $jobid, 'hq', $this->id, 1, 'fax', format_phone_number($this->fax), $display_fax, 'public');
+ } else {
+ $jobid = $res->fetchOneCell();
+ $success = true;
+ }
+ return XDB::execute('UPDATE profile_job
+ SET jobid = {?}
+ WHERE uid = {?} AND id = {?}',
+ $jobid, $this->user->id(), $this->id);
+ }
+
+ // }}}
+}
+
+// }}}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
+?>
--- /dev/null
- * Copyright (C) 2003-2007 Polytechnique.org *
+<?php
+/***************************************************************************
++ * Copyright (C) 2003-2009 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+/**
+ * @brief Module to merge data from AX database
+ *
+ * Module to import data from another database of alumni that had
+ * different schemas. The organization that used this db is called AX
+ * hence the name of this module.
+ *
+ * Datas are stored in an external server and you need a private key
+ * to connect to their server.
+ */
+class FusionAxModule extends PLModule
+{
+ function __construct()
+ {
+ }
+
+ function handlers()
+ {
+ return array(
+ 'fusionax' => $this->make_hook('index', AUTH_MDP, 'admin'),
+ 'fusionax/import' => $this->make_hook('import', AUTH_MDP, 'admin'),
+ 'fusionax/view' => $this->make_hook('view', AUTH_MDP, 'admin'),
+ 'fusionax/ids' => $this->make_hook('ids', AUTH_MDP, 'admin'),
+ 'fusionax/deceased' => $this->make_hook('deceased', AUTH_MDP, 'admin'),
+ 'fusionax/promo' => $this->make_hook('promo', AUTH_MDP, 'admin'),
+ );
+ }
+
+
+ function handler_index(&$page)
+ {
+ $globals = Platal::globals();
+
+ $page->changeTpl('fusionax/index.tpl');
+ $page->assign('xorg_title', 'Polytechnique.org - Fusion des annuaires');
+ if (isset($globals->fusionax) && isset($globals->fusionax->LastUpdate)) {
+ $page->assign('lastimport', date("d-m-Y", $globals->fusionax->LastUpdate));
+ }
+ }
+
+ /** Import de l'annuaire de l'AX depuis l'export situé dans le home de jacou */
+ function handler_import(&$page, $action = 'index', $fileSQL = '')
+ {
+ $globals = Platal::globals();
+
+ if ($action == 'index') {
+ $page->changeTpl('fusionax/import.tpl');
+ $page->addJsLink('jquery.js');
+ if (isset($globals->fusionax) && isset($globals->fusionax->LastUpdate)) {
+ $page->assign(
+ 'lastimport',
+ "le " . date("d/m/Y à H:i", $globals->fusionax->LastUpdate));
+ }
+ return;
+ }
+
+ // toutes les actions sont faites en ajax en utilisant jquery
+ header("Content-type: text/javascript; charset=utf-8");
+
+ // log des actions
+ $report = array();
+
+ // création d'un fichier temporaire si nécessaire
+ if (Env::has('tmpdir')) {
+ $tmpdir = Env::v('tmpdir');
+ } else {
+ $tmpdir = tempnam('/tmp', 'fusionax');
+ unlink($tmpdir);
+ mkdir($tmpdir);
+ chmod($tmpdir, 0700);
+ }
+
+ $modulepath = realpath(dirname(__FILE__) . '/fusionax/') . '/';
+ $olddir = getcwd();
+ chdir($tmpdir);
+
+ if ($action == 'launch') {
+ // séparation de l'archive en fichiers par tables
+ exec($modulepath . 'import-ax.sh', $report);
+ $report[] = 'Fichier parsé.';
+ $report[] = 'Import dans la base en cours...';
+ $next = 'integrateSQL';
+ } elseif ($action == 'integrateSQL') {
+ // intégration des données dans la base MySQL
+ // liste des fichiers sql à exécuter
+ $filesSQL = array(
+ 'Activites.sql',
+ 'Adresses.sql',
+ 'Anciens.sql',
+ 'Formations.sql',
+ 'Entreprises.sql');
+ if ($fileSQL != '') {
+ // récupère le contenu du fichier sql
+ $queries = explode(';', file_get_contents($modulepath . $fileSQL));
+ foreach ($queries as $q) {
+ if (trim($q)) {
+ // coupe le fichier en requêtes individuelles
+ if (substr($q, 0, 2) == '--') {
+ // affiche les commentaires dans le report
+ $lines = explode("\n", $q);
+ $l = $lines[0];
+ $report[] = addslashes($l);
+ }
+ // exécute la requête
+ XDB::execute($q);
+ }
+ }
+ // trouve le prochain fichier à exécuter
+ $trans = array_flip($filesSQL);
+ $nextfile = $trans[$fileSQL] + 1;
+ } else {
+ $nextfile = 0;
+ }
+ if (!isset($filesSQL[$nextfile])) {
+ // tous les fichiers ont été exécutés, on passe à l'étape
+ // suivante
+ $next = 'clean';
+ } else {
+ // on passe au fichier suivant
+ $next = 'integrateSQL/' . $filesSQL[$nextfile];
+ }
+ } elseif ($action == 'clean') {
+ // nettoyage du fichier temporaire
+ chdir($olddir);
+ exec("rm -Rf $tmpdir", $report);
+ $report[] = "Fin de l\'import";
+ // met à jour la date de dernier import
+ //$globals->change_dynamic_config(array('LastUpdate' => time()), 'FusionAx');
+ }
+ foreach($report as $t) {
+ // affiche les lignes de report
+ echo "$('#fusionax_import').append('" . $t . "<br/>');\n";
+ }
+ if (isset($next)) {
+ $tmpdir = getcwd();
+ chdir($olddir);
+ // lance le prochain script s'il y en a un
+ echo "$.getScript('fusionax/import/" . $next . "?tmpdir=" . urlencode($tmpdir) . "');";
+ }
+ // exit pour ne pas afficher la page template par défaut
+ exit;
+ }
+
+ /** Import de l'annuaire de l'AX depuis l'export situé dans le home de jacou */
+ function handler_view(&$page, $action = '')
+ {
+ $globals = Platal::globals();
+
+ $page->changeTpl('fusionax/view.tpl');
+ if ($action == 'create') {
+ XDB::execute('DROP VIEW IF EXISTS fusionax_deceased');
+ XDB::execute('CREATE VIEW fusionax_deceased AS
+ SELECT u.user_id, a.id_ancien, u.nom, u.prenom, u.promo, u.deces AS deces_xorg, a.Date_deces AS deces_ax
+ FROM auth_user_md5 AS u
+ INNER JOIN fusionax_anciens AS a ON (a.id_ancien = u.matricule_ax)
+ WHERE u.deces != a.Date_deces');
+ XDB::execute('DROP VIEW IF EXISTS fusionax_promo');
+ XDB::execute('CREATE VIEW fusionax_promo AS
+ SELECT u.user_id, u.matricule_ax, CONCAT(u.nom, " ", u.prenom) AS display_name, u.promo AS promo_etude_xorg,
+ f.promotion_etude AS promo_etude_ax, u.promo_sortie AS promo_sortie_xorg
+ FROM auth_user_md5 AS u
+ INNER JOIN fusionax_anciens AS f ON (u.matricule_ax = f.id_ancien)
+ WHERE u.promo != f.promotion_etude AND !(f.promotion_etude = u.promo + 1 AND u.promo_sortie = u.promo + 4)');
+ }
+ }
+
+ /* Mets à NULL le matricule_ax de ces camarades pour marquer le fait qu'ils ne figurent pas dans l'annuaire de l'AX */
+ private static function clear_wrong_in_xorg($user_id)
+ {
+ $res = XDB::execute("UPDATE fusionax_xorg_anciens
+ SET matricule_ax = NULL
+ WHERE user_id = {?}", $user_id);
+ if (!$res) {
+ return 0;
+ }
+ return XDB::affectedRows() / 2;
+ }
+
+ /* Cherche les les anciens présents dans Xorg avec un matricule_ax ne correspondant à rien dans la base de l'AX
+ * (mises à part les promo 1921 et 1923 qui ne figurent pas dans les données de l'AX)*/
+ private static function find_wrong_in_xorg($limit = 10)
+ {
+ return XDB::iterator("SELECT u.promo, u.user_id, u.display_name
+ FROM fusionax_xorg_anciens AS u
+ WHERE NOT EXISTS (SELECT *
+ FROM fusionax_anciens AS f
+ WHERE f.id_ancien = u.matricule_ax)
+ AND u.matricule_ax IS NOT NULL AND promo != 1921 AND promo != 1923");
+ }
+
+ /** Lier les identifiants d'un ancien dans les deux annuaires
+ * @param user_id identifiant dans l'annuaire X.org
+ * @param matricule_ax identifiant dans l'annuaire de l'AX
+ * @return 0 si la liaison a échoué, 1 sinon
+ */
+ private static function link_by_ids($user_id, $matricule_ax)
+ {
+ $res = XDB::execute("UPDATE fusionax_import AS i
+ INNER JOIN fusionax_xorg_anciens AS u
+ SET u.matricule_ax = i.id_ancien,
+ i.user_id = u.user_id,
+ i.date_match_id = NOW()
+ WHERE i.id_ancien = {?} AND u.user_id = {?}
+ AND (u.matricule_ax != {?} OR u.matricule_ax IS NULL
+ OR i.user_id != {?} OR i.user_id IS NULL)",
+ $matricule_ax, $user_id, $matricule_ax, $user_id);
+ if (!$res) {
+ return 0;
+ }
+ return XDB::affectedRows() / 2;
+ }
+
+ /** Recherche automatique d'anciens à lier entre les deux annuaires
+ * @param limit nombre d'anciens à trouver au max
+ * @param sure si true, ne trouve que des anciens qui sont quasi sûrs
+ * @return un XOrgDBIterator sur les entrées avec display_name, promo,
+ * user_id, id_ancien et display_name_ax
+ */
+ private static function find_easy_to_link($limit = 10, $sure = false)
+ {
+ $easy_to_link = XDB::iterator("
+ SELECT u.display_name, u.promo, u.user_id, ax.id_ancien,
+ CONCAT(ax.prenom, ' ', ax.nom_complet, ' (X ', ax.promotion_etude, ')') AS display_name_ax,
+ COUNT(*) AS nbMatches
+ FROM fusionax_anciens AS ax
+ INNER JOIN fusionax_import AS i ON (i.id_ancien = ax.id_ancien AND i.user_id IS NULL)
+ LEFT JOIN fusionax_xorg_anciens AS u ON (u.matricule_ax IS NULL
+ AND ax.Nom_patronymique = u.nom
+ AND ax.prenom = u.prenom
+ AND u.promo = ax.promotion_etude)
+ GROUP BY u.user_id
+ HAVING u.user_id IS NOT NULL AND nbMatches = 1 " . ($limit ? ('LIMIT ' . $limit) : ''));
+ if ($easy_to_link->total() > 0 || $sure) {
+ return $easy_to_link;
+ }
+ return XDB::iterator("
+ SELECT u.display_name, u.promo, u.user_id, ax.id_ancien,
+ CONCAT(ax.prenom, ' ', ax.nom_complet, ' (X ', ax.promotion_etude, ')') AS display_name_ax,
+ COUNT(*) AS nbMatches
+ FROM fusionax_anciens AS ax
+ INNER JOIN fusionax_import AS i ON (i.id_ancien = ax.id_ancien AND i.user_id IS NULL)
+ LEFT JOIN fusionax_xorg_anciens AS u ON (u.matricule_ax IS NULL
+ AND (ax.Nom_patronymique = u.nom
+ OR ax.Nom_patronymique LIKE CONCAT(u.nom, ' %')
+ OR ax.Nom_patronymique LIKE CONCAT(u.nom, '-%')
+ OR ax.Nom_usuel = u.nom
+ OR u.nom LIKE CONCAT('% ', ax.Nom_patronymique))
+ AND u.promo < ax.promotion_etude + 2
+ AND u.promo > ax.promotion_etude - 2)
+ GROUP BY u.user_id
+ HAVING u.user_id IS NOT NULL AND nbMatches = 1 " . ($limit ? ('LIMIT ' . $limit) : ''));
+ }
+
+ /** Module de mise en correspondance les ids */
+ function handler_ids(&$page, $part = 'main', $user_id = null, $matricule_ax = null)
+ {
+ $globals = Platal::globals();
+ $nbToLink = 100;
+
+ $page->addJsLink('jquery.js');
+ $page->assign('xorg_title', 'Polytechnique.org - Fusion - Mise en correspondance simple');
+ if ($part == 'missingInAX') {
+ // locate all persons from this database that are not in AX's
+ $page->changeTpl('fusionax/idsMissingInAx.tpl');
+ $missingInAX = XDB::iterator("SELECT promo, user_id, display_name
+ FROM fusionax_xorg_anciens
+ WHERE matricule_ax IS NULL");
+ $page->assign('missingInAX', $missingInAX);
+ return;
+ }
+ if ($part == 'missingInXorg') {
+ // locate all persons from AX's database that are not here
+ $page->changeTpl('fusionax/idsMissingInXorg.tpl');
+ $missingInXorg = XDB::iterator("SELECT a.promotion_etude AS promo,
+ CONCAT(a.prenom, ' ', a.Nom_usuel) AS display_name,
+ a.id_ancien
+ FROM fusionax_import
+ INNER JOIN fusionax_anciens AS a USING (id_ancien)
+ WHERE fusionax_import.user_id IS NULL");
+ $page->assign('missingInXorg', $missingInXorg);
+ return;
+ }
+ if ($part == 'wrongInXorg') {
+ // locate all persons from Xorg database that have a bad AX id
+ $page->changeTpl('fusionax/idswrongInXorg.tpl');
+ $wrongInXorg = FusionAxModule::find_wrong_in_xorg($nbToLink);
+ $page->assign('wrongInXorg', $wrongInXorg);
+ return;
+ }
+ if ($part == 'cleanwronginxorg') {
+ $linksToDo = FusionAxModule::find_wrong_in_xorg($nbToLink);
+ while ($l = $linksToDo->next()) {
+ FusionAxModule::clear_wrong_in_xorg($l['user_id']);
+ }
+ pl_redirect('fusionax/ids/wrongInXorg');
+ }
+ if ($part == 'lier') {
+ if (Post::has('user_id') && Post::has('matricule_ax')) {
+ FusionAxModule::link_by_ids(Post::i('user_id'), Post::v('matricule_ax'));
+ }
+ }
+ if ($part == 'link') {
+ FusionAxModule::link_by_ids($user_id, $matricule_ax);
+ exit;
+ }
+ if ($part == 'linknext') {
+ $linksToDo = FusionAxModule::find_easy_to_link($nbToLink);
+ while ($l = $linksToDo->next()) {
+ FusionAxModule::link_by_ids($l['user_id'], $l['id_ancien']);
+ }
+ pl_redirect('fusionax/ids#autolink');
+ }
+ if ($part == 'linkall') {
+ $linksToDo = FusionAxModule::find_easy_to_link(0);
+ while ($l = $linksToDo->next()) {
+ FusionAxModule::link_by_ids($l['user_id'], $l['id_ancien']);
+ }
+ }
+ {
+ $page->changeTpl('fusionax/ids.tpl');
+ $missingInAX = XDB::query('SELECT COUNT(*)
+ FROM fusionax_xorg_anciens AS u
+ WHERE u.matricule_ax IS NULL');
+ if ($missingInAX) {
+ $page->assign('nbMissingInAX', $missingInAX->fetchOneCell());
+ }
+ $missingInXorg = XDB::query('SELECT COUNT(*)
+ FROM fusionax_import AS i
+ WHERE i.user_id IS NULL');
+ if ($missingInXorg) {
+ $page->assign('nbMissingInXorg', $missingInXorg->fetchOneCell());
+ }
+ $wrongInXorg = FusionAxModule::find_wrong_in_xorg($nbToLink);
+ if ($wrongInXorg->total() > 0) {
+ $page->assign('wrongInXorg', $wrongInXorg->total());
+ }
+ $easyToLink = FusionAxModule::find_easy_to_link($nbToLink);
+ if ($easyToLink->total() > 0) {
+ $page->assign('nbMatch', $easyToLink->total());
+ $page->assign('easyToLink', $easyToLink);
+ }
+ }
+ }
+
+ function handler_deceased(&$page, $action = '')
+ {
+ if ($action == 'updateXorg') {
+ XDB::execute('UPDATE fusionax_deceased
+ SET deces_xorg = deces_ax
+ WHERE deces_xorg = "0000-00-00"');
+ }
+ if ($action == 'updateAX') {
+ XDB::execute('UPDATE fusionax_deceased
+ SET deces_ax = deces_xorg
+ WHERE deces_ax = "0000-00-00"');
+ }
+ if ($action == 'update') {
+ if (Post::has('user_id') && Post::has('date')) {
+ XDB::execute('UPDATE fusionax_deceased
+ SET deces_ax = {?}, deces_xorg = {?}
+ WHERE user_id = {?}',
+ Post::v('date'), Post::v('date'), Post::i('user_id'));
+ }
+ }
+ $page->changeTpl('fusionax/deceased.tpl');
+ // deceased
+ $deceasedErrorsSql = XDB::query('SELECT COUNT(*) FROM fusionax_deceased');
+ $page->assign('deceasedErrors', $deceasedErrorsSql->fetchOneCell());
+ $res = XDB::iterator('SELECT d.user_id, d.id_ancien, d.nom, d.prenom, d.promo, d.deces_ax,
+ CONCAT(d.prenom, " ", d.nom) AS display_name
+ FROM fusionax_deceased AS d
+ WHERE d.deces_xorg = "0000-00-00"
+ LIMIT 10');
+ $page->assign('nbDeceasedMissingInXorg', $res->total());
+ $page->assign('deceasedMissingInXorg', $res);
+ $res = XDB::iterator('SELECT d.user_id, d.id_ancien, d.nom, d.prenom, d.promo, d.deces_xorg,
+ CONCAT(d.prenom, " ", d.nom) AS display_name
+ FROM fusionax_deceased AS d
+ WHERE d.deces_ax = "0000-00-00"
+ LIMIT 10');
+ $page->assign('nbDeceasedMissingInAX', $res->total());
+ $page->assign('deceasedMissingInAX', $res);
+ $res = XDB::iterator('SELECT d.user_id, d.id_ancien, d.nom, d.prenom, d.promo,
+ d.deces_ax, d.deces_xorg,
+ CONCAT(d.prenom, " ", d.nom, " ", d.user_id) AS display_name
+ FROM fusionax_deceased AS d
+ WHERE d.deces_xorg != "0000-00-00" AND d.deces_ax != "0000-00-00"');
+ $page->assign('nbDeceasedDifferent', $res->total());
+ $page->assign('deceasedDifferent', $res);
+ }
+
+ function handler_promo(&$page, $action = '')
+ {
+ $page->changeTpl('fusionax/promo.tpl');
+ $res = XDB::iterator('SELECT user_id, display_name, promo_etude_xorg, promo_sortie_xorg, promo_etude_ax
+ FROM fusionax_promo
+ WHERE !(promo_etude_ax + 1 = promo_etude_xorg AND promo_etude_xorg + 3 = promo_sortie_xorg)');
+ $nbMissmatchingPromos = $res->total();
+ $page->assign('nbMissmatchingPromos1', $res->total());
+ $page->assign('missmatchingPromos1', $res);
+ $res = XDB::iterator('SELECT user_id, display_name, promo_etude_xorg, promo_sortie_xorg, promo_etude_ax
+ FROM fusionax_promo
+ WHERE promo_etude_ax + 1 = promo_etude_xorg AND promo_etude_xorg + 3 = promo_sortie_xorg');
+ $nbMissmatchingPromos += $res->total();
+ $page->assign('nbMissmatchingPromos2', $res->total());
+ $page->assign('missmatchingPromos2', $res);
+ $page->assign('nbMissmatchingPromos', $nbMissmatchingPromos);
+ }
+}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:?>
--- /dev/null
- * Copyright (C) 2003-2008 Polytechnique.org *
+<?php
+/***************************************************************************
++ * Copyright (C) 2003-2009 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+function smarty_function_display_phones($param, &$smarty)
+{
+ $txthtml = "";
+ if (count($param['tels'])) {
+ foreach ($param['tels'] as $tel) {
+ switch ($tel['tel_type']) {
+ case 'fixed':
+ $tel_type = 'Tél';
+ break;
+ case 'fax':
+ $tel_type = 'Fax';
+ break;
+ case 'mobile':
+ $tel_type = 'Mob';
+ break;
+ default:
+ $tel_type = $tel['tel_type'];
+ }
+ $txthtml .= "<div>\n<em>" . $tel_type . " : </em>\n<strong>" . $tel['tel'] . "</strong>\n";
+ $comment = "";
+ if ($tel['comment'] != "") {
+ $commentHtml = str_replace(array('&', '"'), array('&', '"'), $tel['comment']);
+ $commentJs = str_replace(array('\\', '\''), array('\\\\', '\\\''), $commentHtml);
+ $txthtml .= "<img style=\"margin-left: 5px;\" src=\"images/icons/comments.gif\""
+ . " onmouseover=\"return overlib('"
+ . $commentJs
+ . "',WIDTH,250);\""
+ . " onmouseout=\"nd();\""
+ . " alt=\"Commentaire\" title=\""
+ . $commentHtml
+ . "\"/>\n";
+ }
+ $txthtml .= "</div>\n";
+ }
+ }
+ return $txthtml;
+}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
+?>
--- /dev/null
- {* Copyright (C) 2003-2008 Polytechnique.org *}
+{**************************************************************************}
+{* *}
++{* Copyright (C) 2003-2009 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+{iterate from=$users item=vcard}
+BEGIN:VCARD
+VERSION:3.0
+{if $vcard.nom_usage}
+FN:{$vcard.prenom|vcard_enc} {$vcard.nom_usage|vcard_enc} ({$vcard.nom|vcard_enc})
+{else}
+FN:{$vcard.prenom|vcard_enc} {$vcard.nom|vcard_enc}
+{/if}
+N:{$vcard.nom|vcard_enc};{$vcard.prenom|vcard_enc};{$vcard.nom_usage|vcard_enc};;
+{if $vcard.nickname}
+NICKNAME:{$vcard.nickname|vcard_enc}
+{/if}
+EMAIL;TYPE=internet,pref:{$vcard.bestalias}@{#globals.mail.domain#}
+EMAIL;TYPE=internet:{$vcard.bestalias}@{#globals.mail.domain2#}
+{if $vcard.bestalias neq $vcard.forlife}
+EMAIL;TYPE=internet:{$vcard.forlife}@{#globals.mail.domain#}
+EMAIL;TYPE=internet:{$vcard.forlife}@{#globals.mail.domain2#}
+{/if}
+{if $vcard.virtualalias}
+EMAIL;TYPE=internet:{$vcard.virtualalias}
+{/if}
+{if $vcard.tels}
+{foreach item=tel from=$vcard.tels}
+{if $tel.tel_type eq 'mobile'}TEL;TYPE=cell{else}{if $tel.tel_type eq 'fax'}FAX{else}TEL{/if};TYPE=home{/if}:{$tel.tel|vcard_enc}
+{/foreach}
+{/if}
+{if $vcard.adr_pro}
+{if $vcard.adr_pro[0].entreprise}
+ORG:{$vcard.adr_pro[0].entreprise|vcard_enc}
+{/if}
+{if $vcard.adr_pro[0].poste}
+TITLE:{$vcard.adr_pro[0].poste|vcard_enc}
+{/if}
+{if $vcard.adr_pro[0].fonction}
+ROLE:{$vcard.adr_pro[0].fonction|vcard_enc}
+{/if}
+{if $vcard.adr_pro[0].tels}
+{foreach item=tel from=$vcard.adr_pro[0].tels}
+{if $tel.tel_type eq 'mobile'}TEL;TYPE=cell,work{else}{if $tel.tel_type eq 'fax'}FAX{else}TEL{/if};TYPE=work{/if}:{$tel.tel|vcard_enc}
+{/foreach}
+{/if}
+ADR;TYPE=work:{format_adr adr=$vcard.adr_pro[0]}
+{/if}
+{foreach item=adr from=$vcard.adr}
+ADR;TYPE=home{if $adr.courier},postal{/if}:{format_adr adr=$adr}
+{if $adr.tels}
+{foreach item=tel from=$adr.tels}
+{if $tel.tel_type eq 'mobile'}TEL;TYPE=cell,home{else}{if $tel.tel_type eq 'fax'}FAX{else}TEL{/if};TYPE=home{/if}:{$tel.tel|vcard_enc}
+{/foreach}
+{/if}
+{/foreach}
+{foreach from=$vcard.networking item=nw}
+{if $nw.filter eq 'web'}
+URL:{$nw.address}
+{/if}
+{/foreach}
+{if strlen(trim($vcard.freetext)) == 0}
+NOTE:(X{$vcard.promo})
+{else}
+NOTE:(X{$vcard.promo})\n{$vcard.freetext|miniwiki:'no_title':'text'|vcard_enc}
+{/if}
+{if $vcard.section}
+X-SECTION:{$vcard.section}
+{/if}
+{if $vcard.binets_vcardjoin}
+X-BINETS:{$vcard.binets_vcardjoin}
+{/if}
+{if $vcard.gpxs_vcardjoin}
+X-GROUPS:{$vcard.gpxs_vcardjoin}
+{/if}
+{if $vcard.photo}
+PHOTO;ENCODING=b;TYPE={$vcard.photo.attachmime}:{$vcard.photo.attach|base64_encode|vcard_enc}
+{/if}
+SORT-STRING:{$vcard.nom|vcard_enc}
+REV:{$vcard.date|date_format:"%Y%m%dT000000Z"}
+END:VCARD{"\n"}
+{/iterate}
+{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
--- /dev/null
- {* Copyright (C) 2003-2007 Polytechnique.org *}
+{**************************************************************************}
+{* *}
++{* Copyright (C) 2003-2009 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<h2><a href="fusionax">Fusion des annuaires X.org - AX<a> / Décès</h2>
+
+{if $deceasedErrors}
+<p>Voici les {$deceasedErrors} différences entre les deux annuaires pour les renseignements de
+décès.</p>
+
+{if $nbDeceasedMissingInXorg > 0}
+<p>Anciens déclarés décédés dans l'annuaire AX mais pas sur Xorg</p>
+{include file='fusionax/listFusion.tpl' fusionList=$deceasedMissingInXorg field1='deces_ax' namefield1='Décès AX'}
+
+<a href="fusionax/deceased/updateXorg">Inclure toutes les dates de décès connues par l'AX sur Xorg.</a>
+{/if}
+
+{if $nbDeceasedMissingInAX > 0}
+<p>Anciens déclarés décédés dans l'annuaire Xorg mais pas chez l'AX</p>
+{include file='fusionax/listFusion.tpl' fusionList=$deceasedMissingInAX field1='deces_xorg' namefield1='Décès X.org'}
+
+<a href="fusionax/deceased/updateAX">Considérer ces cas comme traités (il n'y a rien à importer).</a>
+{/if}
+
+{if $nbDeceasedDifferent > 0}
+<p>Anciens déclarés décédés dans les deux annuaires mais pas avec la même date</p>
+{include file='fusionax/listFusion.tpl' fusionList=$deceasedDifferent field1='deces_xorg' field2='deces_ax' namefield1='Décès X.org' namefield2='Décès AX'}
+
+<h3>Mettre en correspondance</h3>
+<form action="fusionax/deceased/update" method="post">
+ User ID X.org : <input type="text" name="user_id" value=""/><br/>
+ Date de décès : <input type="text" name="date" value""/><br/>
+ <input type="submit" value="Mettre à jour"/>
+</form>
+{/if}
+
+{else}
+<p>Aucune différence pour les renseignements de décès entre les deux annuaires.</p>
+{/if}
+
+{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
--- /dev/null
- {* Copyright (C) 2003-2007 Polytechnique.org *}
+{**************************************************************************}
+{* *}
++{* Copyright (C) 2003-2009 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<h2><a href="fusionax">Fusion des annuaires X.org - AX</a> / Identifiants</h2>
+
+<p>Le préalable à toute fusion de renseignements pour une personne entre ce
+que contient la base AX et ce que contient ce site est bien évidemment de
+trouver une correspondance entre les personnes renseignés dans ces annuaires.</p>
+
+{if $nbMissingInAX}
+<h3>Anciens manquants à l'AX</h3>
+
+<p><a href="fusionax/ids/missingInAX">{$nbMissingInAX} ancien{if $nbMissingInAX > 1}s{/if}</a>.</p>
+{/if}
+
+{if $nbMissingInXorg > 0}
+<h3>Anciens manquants à x.org</h3>
+
+<p><a href="fusionax/ids/missingInXorg">{$nbMissingInXorg} ancien{if $nbMissingInXorg > 1}s{/if}</a>.</p>
+{/if}
+
+{if $wrongInXorg > 0}
+<h3>Anciens ayant un matricule_ax sur Xorg ne correspondant à rien dans la base de l'AX</h3>
+
+<p><a href="fusionax/ids/wrongInXorg">{$wrongInXorg} ancien{if $wrongInXorg > 1}s{/if}</a>.</p>
+{/if}
+
+<h3>Mettre en correspondance</h3>
+<form action="fusionax/ids/lier" method="post">
+ Matricule AX : <input type="text" name="matricule_ax" value""/><br/>
+ User ID X.org : <input type="text" name="user_id" value=""/><br/>
+ <input type="submit" value="Lier"/>
+</form>
+
+<p></p>
+<div id="autolink" name="autolink">
+<h3>Mise en correspondance automatique</h3>
+{if $easyToLink}
+<p>
+ Ces anciens sont probablement les mêmes (à peu près mêmes nom, prénom, promo)<br />
+ {$nbMatch} correspondances trouvées.
+</p>
+
+{include file="fusionax/listFusion.tpl" fusionList=$easyToLink fusionAction="fusionax/ids/link" name="lier" field1="display_name_ax" namefield1="Ancien AX"}
+<p><a href="fusionax/ids/linknext">Lier toutes les fiches affichées</a> <span id="fusion-reload" style="display:none"> - <a href="fusionax/ids#autolink">Trouver d'autres correspondances</a></span></p>
+<script type="text/javascript">
+{literal}
+//<!--
+$(document).ready(function() {
+ $('#autolink a.fusion-action').click(function(a){
+ $.get(a.currentTarget.href,{},function(){
+ $(a.currentTarget).hide();
+ $('#fusion-reload').show();
+ $('#fusion-reload a').click(function(a) {
+ document.location = a.currentTarget.href;
+ document.location.reload();
+ });
+ });
+ return false;
+ });
+});
+//-->
+{/literal}
+</script>
+{else}
+<p>Aucune correspondance automatique n'a été trouvée (mêmes nom, prénom, promo d'étude).</p>
+{/if}
+</div>
--- /dev/null
- {* Copyright (C) 2003-2007 Polytechnique.org *}
+{**************************************************************************}
+{* *}
++{* Copyright (C) 2003-2009 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<h2><a href="fusionax">Fusion des annuaires X.org - AX<a> / <a href="fusionax/ids">Identifiants<a> / Manquants dans l'annuaire de l'AX</h2>
+
+<p></p>
+
+{if $missingInAX}
+{include file='fusionax/listFusion.tpl' fusionList=$missingInAX field1='user_id' namefield1='ID X.org'}
+{/if}
--- /dev/null
- {* Copyright (C) 2003-2007 Polytechnique.org *}
+{**************************************************************************}
+{* *}
++{* Copyright (C) 2003-2009 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<h2><a href="fusionax">Fusion des annuaires X.org - AX<a> / <a href="fusionax/ids">Identifiants<a> / Manquants dans l'annuaire d'X.org</h2>
+
+<p></p>
+
+{if $missingInXorg}
+{include file='fusionax/listFusion.tpl' fusionList=$missingInXorg field1='id_ancien' namefield1='matricule AX'}
+{/if}
--- /dev/null
- {* Copyright (C) 2003-2007 Polytechnique.org *}
+{**************************************************************************}
+{* *}
++{* Copyright (C) 2003-2009 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<h2><a href="fusionax">Fusion des annuaires X.org - AX<a> / <a href="fusionax/ids">Identifiants<a> / Présents dans Xorg avec un matricule_ax ne correspondant à rien
+dans la base de l'AX (mises à part les promo 1921 et 1923 qui ne figurent pas dans les données de l'AX)</h2>
+
+<p></p>
+
+{if $wrongInXorg}
+{include file='fusionax/listFusion.tpl' fusionList=$wrongInXorg field1='user_id' namefield1='ID X.org'}
+
+<p><a href="fusionax/ids/cleanwronginxorg">Mettre à NULL le matricule_ax de ces camarades pour marquer le fait qu'ils ne figurent pas dans l'annuaire de l'AX</a></p>
+{/if}
--- /dev/null
- {* Copyright (C) 2003-2007 Polytechnique.org *}
+{**************************************************************************}
+{* *}
++{* Copyright (C) 2003-2009 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<script type="text/javascript">
+{literal}
+//<!--
+ $(document).ready(function() {
+ $('#fusionax_import input').click(function() {
+ $('#fusionax_import input').hide();
+ $('#fusionax_import').append('Lancement de l\'import.<br/>');
+ $.getScript('fusionax/import/launch');
+ });
+ });
+//-->
+{/literal}
+</script>
+<h2><a href="fusionax">Fusion des annuaires X.org - AX</a></h2>
+
+<h2>Import de l'annuaire AX</h2>
+{if $lastimport}
+<p>Dernier import {$lastimport}</p>
+{/if}
+
+{if $keymissing}
+<p>Impossible de faire l'import, il manque la clef d'authentification :</p>
+<pre>{$keymissing}</pre>
+{else}
+<div id="fusionax_import">
+<input type="button" value="Lancer l'import"/>
+</div>
+{/if}
+
+{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
--- /dev/null
- {* Copyright (C) 2003-2007 Polytechnique.org *}
+{**************************************************************************}
+{* *}
++{* Copyright (C) 2003-2009 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<h2>Fusion des annuaires X.org - AX</h2>
+<ul>
+<li>Voir la <a href="Fusion">documentation</a></li>
+<li><a href="fusionax/import">Import de la base AX</a> {if $lastimport} - (dernier import le {$lastimport}){/if}</li>
+<li>Mise en <a href="fusionax/ids">correspondance simple</a></li>
+<li>Création des <a href="fusionax/view">VIEW annexes nécessaires aux corrélations</a></li>
+<li>Corrélation des <a href="fusionax/deceased">dates de décès</a></li>
+<li>Corrélation des <a href="fusionax/promo">promotions</a></li>
+<li>Corrélation des <a href="fusionax/names">données d'identification</a></li>
+<li>Corrélation des <a href="fusionax/coords">coordonnées</a></li>
+<li>Corrélation des <a href="fusionax/pros">informations professionnelles</a></li>
+<li>Corrélation des <a href="fusionax/studies">informations de formations</a></li>
+</ul>
+
+{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
--- /dev/null
- {* Copyright (C) 2003-2007 Polytechnique.org *}
+{**************************************************************************}
+{* *}
++{* Copyright (C) 2003-2009 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<table class="bicol">
+ <tr>
+ <th>Ancien</th>
+ <th>Fiches</th>
+ {if $field1}
+ <th>{$namefield1}</th>
+ {/if}
+ {if $field2}
+ <th>{$namefield2}</th>
+ {/if}
+ {if $field3}
+ <th>{$namefield3}</th>
+ {/if}
+ {if $field4}
+ <th>{$namefield4}</th>
+ {/if}
+ {if $fusionAction}
+ <th>Action</th>
+ {/if}
+ </tr>
+{if $fusionList}
+{iterate from=$fusionList item=c}
+ <tr class="{cycle values="pair,impair"}">
+ <td>{$c.display_name} (X {$c.promo})</td>
+ <td style="text-align:center">
+ {if $c.user_id}<a href="admin/user/{$c.user_id}" class="popup2">{icon name="user_suit" title="Administrer utilisateur"}</a>{/if}
+ {if $c.id_ancien}<a href="http://www.polytechniciens.com/?page=AX_FICHE_ANCIEN&anc_id={$c.id_ancien}" class="popup2">{icon name="user_gray" title="fiche AX"}</a>{/if}
+ </td>
+ {if $field1}
+ <td>{$c.$field1}</td>
+ {/if}
+ {if $field2}
+ <td>{$c.$field2}</td>
+ {/if}
+ {if $field3}
+ <td>{$c.$field3}</td>
+ {/if}
+ {if $field4}
+ <td>{$c.$field4}</td>
+ {/if}
+ {if $fusionAction}
+ <td><a class="fusion-action" href="{$fusionAction}/{$c.user_id}/{$c.id_ancien}">{$name}</a></td>
+ {/if}
+ </tr>
+{/iterate}
+{/if}
+</table>
--- /dev/null
- {* Copyright (C) 2003-2007 Polytechnique.org *}
+{**************************************************************************}
+{* *}
++{* Copyright (C) 2003-2009 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<h2><a href="fusionax">Fusion des annuaires X.org - AX</a> / Promotions</h2>
+
+<p></p>
+
+{if $nbMissmatchingPromos > 0}
+<p>Il y a {$nbMissmatchingPromos} différences entre les deux bases dans pour les promotions.</p>
+<p>Grosses différences (oranjisation ?) :</p>
+{include file='fusionax/listFusion.tpl' fusionList=$missmatchingPromos1 field1='user_id' namefield1='ID X.org' field3='promo_etude_xorg'
+namefield3='etude_xorg' field4='promo_sortie_xorg' namefield4='sortie_xorg' field2='promo_etude_ax' namefield2='etude_ax'}
+
+<p>Petites différences : promo_etude_xorg == promo_etude_ax + 1 et promo_etude_xorg + 3 == promo_sortie_xorg, a priori ce sont les étrangers que nous avons mal
+inclus</p>
+{include file='fusionax/listFusion.tpl' fusionList=$missmatchingPromos2 field1='user_id' namefield1='ID X.org' field3='promo_etude_xorg'
+namefield3='etude_xorg' field4='promo_sortie_xorg' namefield4='sortie_xorg' field2='promo_etude_ax' namefield2='etude_ax'}
+{/if}
--- /dev/null
- {* Copyright (C) 2003-2007 Polytechnique.org *}
+{**************************************************************************}
+{* *}
++{* Copyright (C) 2003-2009 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<h2><a href="fusionax">Fusion des annuaires X.org - AX<a> / Création des VIEW annexes nécessaires aux corrélations </h2>
+
+<p><a href="fusionax/view/create">Création des VIEW annexes nécessaires aux corrélations</a></p>
--- /dev/null
- {* Copyright (C) 2003-2008 Polytechnique.org *}
+{**************************************************************************}
+{* *}
++{* Copyright (C) 2003-2009 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+{assign var=new value="new"|cat:$i}
+{assign var=combobox value="combobox"|cat:$i}
+{if !$isjob}
+<tr {if $class}class="{$class}"{/if}>
+ <td>
+{/if}
+ <span class="titre">{if $name eq "email_directory"}Email annuaire AX
+ {elseif $name eq "email"}Ajouter une adresse email{else}
+ Email professionnel{/if}</span>
+{if !$isjob}
+ </td>
+ {if $name eq "email"}<td></td>{/if}
+ <td>
+{else}
+ <br />
+ <span class="flags">
+ {include file="include/flags.radio.tpl" name="`$jobpref`[`$prefix`email_pub]" val=$pub}
+ </span>
+ <br />
+{/if}
+ <select name="{$name}" id="{$combobox}">
+ {if $email_type eq "directory"}
+ <optgroup label="Email annuaire AX">
+ <option value="{$email_directory}" {if
+ $val eq $email_directory}selected="selected"{/if}>{$email_directory}</option>
+ </optgroup>
+ {/if}
+ {if $name eq "email_directory"}
+ <optgroup label="Emails polytechniciens">
+ {if $melix}
+ <option value="{$melix}@{#globals.mail.alias_dom#}" {if
+ $val eq $melix|cat:'@'|cat:#globals.mail.alias_dom#}selected="selected"{/if}>
+ {$melix}@{#globals.mail.alias_dom#}</option>
+ <option value="{$melix}@{#globals.mail.alias_dom2#}" {if
+ $val eq $melix|cat:'@'|cat:#globals.mail.alias_dom2#}selected="selected"{/if}>
+ {$melix}@{#globals.mail.alias_dom2#}</option>
+ {/if}
+ {foreach from=$list_email_X item=email}
+ <option value="{$email.alias}@{#globals.mail.domain#}" {if
+ $val eq $email.alias|cat:'@'|cat:#globals.mail.domain#}selected="selected"{/if}>
+ {$email.alias}@{#globals.mail.domain#}</option>
+ <option value="{$email.alias}@{#globals.mail.domain2#}" {if
+ $val eq $email.alias|cat:'@'|cat:#globals.mail.domain2#}selected="selected"{/if}>
+ {$email.alias}@{#globals.mail.domain2#}</option>
+ {/foreach}
+ </optgroup>
+ {/if}
+ {if (($name neq "email") && ($list_email_redir|@count neq 0))}
+ <optgroup label="Redirections">
+ {foreach from=$list_email_redir item=email}
+ <option value="{$email}" {if $val eq $email}selected="selected"{/if}>{$email}</option>
+ {/foreach}
+ </optgroup>
+ {/if}
+ {if $list_email_pro|@count neq 0}
+ <optgroup label="Emails professionels">
+ {foreach from=$list_email_pro item=email}
+ <option value="{$email}" {if
+ $val eq $email}selected="selected"{/if}>{$email}</option>
+ {/foreach}
+ </optgroup>
+ {/if}
+ <optgroup label="Autres choix">
+ <option value="new@example.org" {if $error}selected="selected"{/if}>Utiliser une autre adresse email</option>
+ <option value="" {if (($val eq '') && (!$error))}selected="selected"{/if}>{if
+ $name neq "email"}Ne pas mettre d'adresse email{else} {/if}</option>
+ </optgroup>
+ </select>
+ {if $name eq "email_directory"}
+ <input type="checkbox" disabled="disabled" checked="checked"/>
+ {icon name="flag_orange" title="Visible sur l'annuaire"}
+ {elseif ($name neq "email") && (!$isjob)}
+ <span class="flags">
+ {include file="include/flags.radio.tpl" name="`$jobpref`[`$prefix`email_pub]" val=$pub}
+ </span>
+ {/if}
+ <br />
+ <span class="{$new}" style="display: none">
+ <input type="text" maxlength="60" {if $error}class="error" value="{$val}"{/if} name="{if (($name neq "email_directory")
+ && ($name neq "email"))}jobs[{$i}][{$prefix}email_new]{else}{$name}_new{/if}"/>
+ </span>
+ <script type="text/javascript">//<![CDATA[
+ {literal}
+ $(function() {
+ var i = {/literal}{$i}{literal};
+ $('select#combobox' + i).change(function() {
+ $('.new' + i).hide();
+ if ($('select#combobox' + i).val() == "new@example.org") {
+ $('.new' + i).show();
+ }
+ }).change();
+ });
+ {/literal}
+ // ]]></script>
+{if !$isjob}
+ </td>
+ {if $name eq "email"}<td></td>{/if}
+</tr>
+{else}
+<br />
+{/if}
+{if $name neq "email"}
+{if !$isjob}
+ <tr {if $class}class="{$class} {$new}"{else}class="{$new}"{/if} style="display: none">
+ <td colspan="2">
+{else}
+ <div class="{$new}" style="display: none">
+{/if}
+ <p><small><strong><em>Attention :</em></strong> cette adresse email figurera dans
+ {if $name eq "email_directory"}l'annuaire papier{else}tes informations professionnelles
+ {/if} mais n'est pas ajoutée à la liste de tes redirections. Nous te conseillons fortement de
+ <strong><a href="emails/redirect">l'ajouter là</a></strong>, surtout
+ si tu n'en as plus de valide.</small></p>
+{if !$isjob}
+ </td>
+ </tr>
+{else}
+ </div>
+{/if}
+{/if}
+
+{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
--- /dev/null
- {* Copyright (C) 2003-2008 Polytechnique.org *}
+{**************************************************************************}
+{* *}
++{* Copyright (C) 2003-2009 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<strong>Nom :</strong>
+<input type="text" name="name" size="25" maxlength="200" value="{$valid->name}" /><br />
+<strong>Acronyme :</strong>
+<input type="text" name="acronym" size="25" maxlength="200" value="{$valid->acronym}" /><br />
+<strong>Site web :</strong>
+<input type="text" name="url" size="25" maxlength="200" value="{$valid->url}" /><br />
+<strong>Email :</strong>
+<input type="text" name="url" size="25" maxlength="200" value="{$valid->email}" /><br />
+<strong>Holding :</strong>
+<input type="text" name="holdingid" size="25" maxlength="200" value="{$valid->holdingid}" /><br />
+<strong>Code NAF :</strong>
+<input type="text" name="NAF_code" size="25" maxlength="200" value="{$valid->NAF_code}" /><br />
+<strong>Code AX :</strong>
+<input type="text" name="AX_code" size="25" maxlength="200" value="{$valid->AX_code}" /><br />
+<strong>Téléphone :</strong>
+<input type="text" name="tel" size="25" maxlength="200" value="{$valid->tel}" /><br />
+<strong>Fax :</strong>
+<input type="text" name="fax" size="25" maxlength="200" value="{$valid->fax}" /><br />
+
+{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
--- /dev/null
- {* Copyright (C) 2003-2008 Polytechnique.org *}
+{**************************************************************************}
+{* *}
++{* Copyright (C) 2003-2009 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<tr class="pair">
+ <td class="titre">Nom :</td>
+ <td>{$valid->name}</td>
+</tr>
+<tr class="pair">
+ <td class="titre">Noms similaires existants :</td>
+ <td>{$valid->suggestions}</td>
+</tr>
+<tr class="pair">
+ <td class="titre">Acronyme :</td>
+ <td>{$valid->acronym}</td>
+</tr>
+<tr class="pair">
+ <td class="titre">Site web :</td>
+ <td>{$valid->url}</td>
+</tr>
+<tr class="pair">
+ <td class="titre">Email :</td>
+ <td>{$valid->email}</td>
+</tr>
+<tr class="pair">
+ <td class="titre">Holding :</td>
+ <td>{$valid->holdingid}</td>
+</tr>
+<tr class="pair">
+ <td class="titre">Code NAF :</td>
+ <td>{$valid->NAF_code}</td>
+</tr>
+<tr class="pair">
+ <td class="titre">Code AX :</td>
+ <td>{$valid->AX_code}</td>
+</tr>
+<tr class="pair">
+ <td class="titre">Téléphone :</td>
+ <td>{$valid->tel}</td>
+</tr>
+<tr class="pair">
+ <td class="titre">Fax :</td>
+ <td>{$valid->fax}</td>
+</tr>
+<tr class="pair">
+ <td colspan="2" class="center">
+ <small>Bien remplir tous les champs, en particulier les <a href="http://societe.com/">codes NAF</a> et AX !</small>
+ </td>
+</tr>
+
+{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
--- /dev/null
- {* Copyright (C) 2003-2008 Polytechnique.org *}
+{**************************************************************************}
+{* *}
++{* Copyright (C) 2003-2009 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+{assign var=eduname value="edus[`$eduid`]"}
+<tr class="edu_{$eduid} {$class}">
+ <td colspan="2">
+ <a href="javascript:removeEdu('{$eduid}')">
+ {icon name=cross title="Supprimer cette formation"}
+ </a>
+ <select name="{$eduname}[eduid]" onchange="fillType(this.form['{$eduname}[degreeid]'], this.selectedIndex - 1);">
+ {education_options selected=$edu.eduid}
+ </select>
+ </td>
+</tr>
+<tr class="edu_{$eduid} {$class}">
+ <td>
+ <span class="titre">Diplôme :</span>
+ </td>
+ <td>
+ <input type="hidden" name="edu_{$eduid}_tmp" value="{$edu.degreeid}" />
+ <select name="{$eduname}[degreeid]">
+ <option value=""></option>
+ </select>
+ </td>
+</tr>
+<tr class="edu_{$eduid} {$class}">
+ <td>
+ <span class="titre">Domaine de formation :</span>
+ </td>
+ <td>
+ <select name="{$eduname}[fieldid]">
+ {foreach from=$edu_fields item=field}
+ <option value="{$field.id}" {if $field.id eq $edu.fieldid}selected="selected"{/if}>{$field.field}</option>
+ {/foreach}
+ </select>
+ </td>
+</tr>
+<tr class="edu_{$eduid} {$class}">
+ <td>
+ <span class="titre">Année d'obtention du diplôme :</span>
+ </td>
+ <td>
+ <input type="text" {if $edu.error}class="error"{/if} name="{$eduname}[grad_year]"
+ value="{$edu.grad_year}" size="4" maxlength="4" />
+ <small>(par exemple : 2008)</small>
+ </td>
+</tr>
+<tr class="edu_{$eduid} {$class}">
+ <td>
+ <span class="titre">Intitulé de la formation :</span>
+ </td>
+ <td>
+ <input type="text" name="{$eduname}[program]" value="{$edu.program}" size="30" maxlength="255" />
+ </td>
+</tr>
+
+{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
--- /dev/null
- {* Copyright (C) 2003-2008 Polytechnique.org *}
+{**************************************************************************}
+{* *}
++{* Copyright (C) 2003-2009 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<tr id="networking_{$i}">
+ <td colspan="2">
+ <div style="float: left; width: 200px;">
+ <span class="flags">
+ <label><input type="checkbox"
+ {if $nw.pub neq 'private'} checked="checked"{/if}
+ name="networking[{$i}][pub]"/>
+ {icon name="flag_green" title="site public"}</label>
+ </span>
+ <input type="hidden" name="networking[{$i}][type]" value="{$nw.type}"/>
+ <input type="hidden" name="networking[{$i}][name]" value="{$nw.name}"/>
+ <img src="profile/networking/{$nw.type}" alt="{$nw.name}" title="{$nw.name}" />
+ <span style="">{$nw.name}</span>
+ </div>
+ <div style="float: left">
+ <input type="text" name="networking[{$i}][address]" value="{$nw.address}"
+ {if $nw.error} class="error" {/if}
+ size="30"/>
+ <a href="javascript:removeNetworking({$i})">
+ {icon name=cross title="Supprimer cet élément"}
+ </a>
+ </div>
+ </td>
+</tr>
+
+{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
--- /dev/null
- {* Copyright (C) 2003-2008 Polytechnique.org *}
+{**************************************************************************}
+{* *}
++{* Copyright (C) 2003-2009 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<tr id="search_name_{$i}"{if $class} class="{$class}" style="{$style}"{/if}>
+ <td>
+ <input type="hidden" name="search_names[{$i}][always_displayed]" value="{$sn.always_displayed}"/>
+ <input type="hidden" name="search_names[{$i}][has_particle]" value="{$sn.has_particle}"/>
+ <span class="flags">
+ <input id="flag_cb_{$i}" type="checkbox" checked="checked" disabled="disabled"/>
+ <span id="flag_{$i}">{if $sn.pub}{icon name="flag_green" title="site public"}
+ {else}{icon name="flag_red" title="site privé"}{/if}</span>
+ </span>
+ {if $sn_type_list}
+ <select id="search_name_select_{$i}" name="search_names[{$i}][typeid]" onchange="changeNameFlag({$i});updateNameDisplay();">
+ {foreach from=$sn_type_list item=sn_type}
+ <option value="{$sn_type.id}">{$sn_type.name}</option>
+ {/foreach}
+ </select>
+ {foreach from=$sn_type_list item=sn_type}
+ <input type="hidden" name="sn_type_{$sn_type.id}_{$i}" value="{$sn_type.pub}"/>
+ {/foreach}
+ {else}
+ {$sn.type}
+ <input type="hidden" name="search_names[{$i}][pub]" value="{$sn.pub}"/>
+ <input type="hidden" name="search_names[{$i}][type]" value="{$sn.type}"/>
+ <input type="hidden" name="search_names[{$i}][typeid]" value="{$sn.typeid}"/>
+ {/if}
+ </td>
+ <td>
+ <input type="text" name="search_names[{$i}][name]" value="{$sn.name}"
+ {if $sn.has_particle}title="Coche la case en bout de ligne si ton nom commence par une particle."{/if}
+ {if $sn.error} class="error"{/if} size="25" onkeyup="updateNameDisplay();"/>
+ </td>
+ <td>
+ {if $sn.has_particle}<input name="search_names[{$i}][particle]" type="checkbox"
+ title="Coche cette case si ton nom commence par une particle."
+ {if $sn.particle neq ''} checked="checked"{/if} onchange="updateNameDisplay();"/>
+ {else}
+ <input type="hidden" name="search_names[{$i}][particle]" value=""/>{/if}
+ {if !$sn.always_displayed}<a href="javascript:removeSearchName({$i})">
+ {icon name=cross title="Supprimer ce nom"}
+ </a>{/if}
+ </td>
+</tr>
+
+{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
--- /dev/null
- {* Copyright (C) 2003-2008 Polytechnique.org *}
+{**************************************************************************}
+{* *}
++{* Copyright (C) 2003-2009 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<?xml version="1.0" encoding="utf-8"?>
+<select name="jobs[{$id}][sss_secteur]">
+ <option value=""></option>
+ {iterate from=$sssecteurs item=sssecteur}
+ <option value="{$sssecteur.id}" {if $sssecteur.id eq $sel}selected="selected"{/if}>{$sssecteur.label}</option>
+ {/iterate}
+</select>
+
+{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
--- /dev/null
- {* Copyright (C) 2003-2008 Polytechnique.org *}
+{**************************************************************************}
+{* *}
++{* Copyright (C) 2003-2009 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<h1>Les différents types de noms</h1>
+<table class="bicol" style="margin-bottom: 1em" summary="Explications sur les différents types de noms">
+ <tr>
+ <th>Type</th>
+ <th>Description</th>
+ <th>Confidentialité ¹</th>
+ <th>Prise en compte de la particule ²</th>
+ <tr>
+ </tr>
+ {iterate from=$types item=type}
+ <tr>
+ <td>{$type.name}</td>
+ <td>{$type.explanations}</td>
+ <td class="center">
+ {if $type.public}
+ {icon name="flag_green" title="site public"}
+ {else}
+ {icon name="flag_red" title="site privé"}
+ {/if}
+ </td>
+ <td class="center">{if $type.has_particle}Oui{else}Non{/if}</td>
+ </tr>
+ {/iterate}
+</table>
+
+<h2>Légende :</h2>
+<ul>
+<li>¹ {icon name="flag_green" title="site public"} signifie que les données sont visibles
+ sur la partie publique du site alors que {icon name="flag_red" title="site privé"} indique
+ qu'elles sont cantonnées au site privé.</li>
+<li>² Pour les types concernés, il faut cocher la case en bout de ligne si le nom débute
+ par une particule, comme cela tu seras correctement classé dans l'ordre alphabétique.</li>
+</ul>
+
+{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
--- /dev/null
- {* Copyright (C) 2003-2008 Polytechnique.org *}
+{**************************************************************************}
+{* *}
++{* Copyright (C) 2003-2009 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+{assign var=telpref value="`$prefname`[`$telid`]"}
+{assign var=id value="`$prefid`_`$telid`"}
+<div class="titre" style="float: left; width: 2.5em">N°{$telid+1}</div>
+<div style="float: left;">
+ <select name="{$telpref}[type]">
+ <option value="fixed"{if $tel.type eq 'fixed'} selected="selected"{/if}>Fixe</option>
+ <option value="mobile"{if $tel.type eq 'mobile'} selected="selected"{/if}>Mobile</option>
+ <option value="fax"{if $tel.type eq 'fax'} selected="selected"{/if}>Fax</option>
+ </select>
+ <input type="hidden" name="{$telpref}[removed]" value="0"/>
+ <input type="text" size="19" maxlength="28" name="{$telpref}[tel]" {if $tel.error}class="error"{/if} value="{$tel.tel}" />
+ <a href="javascript:removeTel('{$id}')">
+ {icon name=cross title="Supprimer ce numéro de téléphone"}
+ </a>
+ <a id="{$id}_addComment" href="javascript:addPhoneComment('{$id}', '{$telpref}')" {if $tel.comment neq ''}style="display:none" {/if}>
+ {icon name=comments title="Ajouter un commentaire"}
+ </a>
+</div>
+<div style="float: right" class="flags">
+ {include file="include/flags.radio.tpl" name="`$telpref`[pub]" val=$tel.pub}
+</div>
+<div id="{$id}_comment" style="clear: both;{if $tel.comment eq ''} display:none{/if}">
+ Commentaire :
+ <input type="text" size="45" maxlength="80" name="{$telpref}[comment]" {if $tel.error}class="error"{/if} value="{$tel.comment}"/>
+ <a href="javascript:removePhoneComment('{$id}', '{$telpref}')">
+ {icon name=cross title="Supprimer le commentaire"}
+ </a>
+</div>
+{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
<?php
/***************************************************************************
-- * Copyright (C) 2003-2007 Polytechnique.org *
++ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *