0337d704 |
1 | {**************************************************************************} |
2 | {* *} |
dd502514 |
3 | {* Copyright (C) 2003-2006 Polytechnique.org *} |
0337d704 |
4 | {* http://opensource.polytechnique.org/ *} |
5 | {* *} |
6 | {* This program is free software; you can redistribute it and/or modify *} |
7 | {* it under the terms of the GNU General Public License as published by *} |
8 | {* the Free Software Foundation; either version 2 of the License, or *} |
9 | {* (at your option) any later version. *} |
10 | {* *} |
11 | {* This program is distributed in the hope that it will be useful, *} |
12 | {* but WITHOUT ANY WARRANTY; without even the implied warranty of *} |
13 | {* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *} |
14 | {* GNU General Public License for more details. *} |
15 | {* *} |
16 | {* You should have received a copy of the GNU General Public License *} |
17 | {* along with this program; if not, write to the Free Software *} |
18 | {* Foundation, Inc., *} |
19 | {* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *} |
20 | {* *} |
21 | {**************************************************************************} |
22 | |
23 | <h1> |
24 | Synchronisation depuis l'AX |
25 | </h1> |
26 | |
33ae80b5 |
27 | {if $no_private_key} |
28 | <p> |
29 | Impossible d'utiliser ce service, il manque la clef privée AX dans la configuration de plat/al. |
30 | </p> |
31 | {else} |
0337d704 |
32 | <form action='{$smarty.request.PHP_SELF}' method='get'> |
33 | <table class="tinybicol"> |
34 | <tr> |
35 | <th>Synchroniser un utilisateur</th> |
36 | </tr> |
37 | <tr> |
38 | <td style='padding:5px'> |
39 | <input type='text' name='user' value='{$smarty.request.user}' size='40' maxlength='255'/> |
40 | <input type='submit' value='Chercher' /> |
41 | </td> |
42 | </tr> |
43 | </table> |
44 | </form> |
33ae80b5 |
45 | {/if} |
0337d704 |
46 | |
33ae80b5 |
47 | {if $x and !no_private_key} |
0337d704 |
48 | <form action='{$smarty.request.PHP_SELF}' method='post'> |
49 | {if $x.profile_from_ax} |
50 | <div style="text-align:center;margin:5px;background:green"> |
51 | <strong>Cet utilisateur a accepeté la synchronisation</strong> |
52 | </div> |
53 | {else} |
54 | <div style="text-align:center;margin:5px;background:red"> |
55 | <strong>ATTENTION ! Cet utilisateur n'a pas accepté la synchronisation</strong> |
56 | </div> |
57 | {/if} |
dd502514 |
58 | <div>Les fiches de cet utilisateur : |
59 | <ul> |
e8599c21 |
60 | <li><a href='{rel}/profile/{$x.user_id}' class='popup2'>polytechnique.org</a></li> |
dd502514 |
61 | <li><a href='http://www.polytechniciens.com/index.php?page=AX_FICHE_ANCIEN&anc_id={$x.matricule_ax}'>polytechniciens.com</a></li> |
62 | </ul> |
63 | </div> |
64 | {if $diff} |
0337d704 |
65 | <table class="bicol" cellpadding="0" cellspacing="0" border="1"> |
dd502514 |
66 | {foreach from=$diff key='k' item='i'} |
67 | {if ($k neq 'adr') and ($k neq 'adr_pro')} |
68 | <tr class="pair"> |
0337d704 |
69 | <td> |
dd502514 |
70 | {$k} |
0337d704 |
71 | </td> |
72 | <td> |
dd502514 |
73 | {$x[$k]} |
0337d704 |
74 | </td> |
75 | <td class='center'> |
0337d704 |
76 | </td> |
77 | <td> |
dd502514 |
78 | {$i} |
0337d704 |
79 | </td> |
80 | </tr> |
dd502514 |
81 | {/if} |
0337d704 |
82 | {/foreach} |
0337d704 |
83 | |
dd502514 |
84 | {if $diff.adr} |
85 | <tr><th> |
86 | Adresses |
87 | </th></tr> |
88 | {foreach from=$diff.adr item='adr'} |
89 | <tr><td> |
90 | {if $adr.remove} |
91 | Effacer l'adresse {$adr.adrid}. |
0337d704 |
92 | {else} |
dd502514 |
93 | {if $adr.adrid}Modifier l'adresse {$adr.adrid} :{else}Ajouter l'adresse :{/if} |
94 | {include file='geoloc/address.tpl' address=$adr no_div=1} |
0337d704 |
95 | {/if} |
dd502514 |
96 | </td></tr> |
97 | {/foreach} |
0337d704 |
98 | {/if} |
0337d704 |
99 | |
dd502514 |
100 | {if $diff.adr_pro} |
101 | <tr><th> |
102 | Emplois |
103 | </th></tr> |
104 | {foreach from=$diff.adr_pro item='pro'} |
105 | <tr><td> |
106 | {if $pro.remove} |
107 | Effacer l'emploi {$pro.entrid}. |
0337d704 |
108 | {else} |
dd502514 |
109 | {if $pro.entrid || $pro.entrid === 0}Modifier l'emploi {$pro.entrid} :{else}Ajouter l'emploi :{/if} |
110 | {if $pro.entreprise} |
111 | <div> |
112 | <em>Entreprise/Organisme : </em> <strong>{$pro.entreprise}</strong> |
113 | </div> |
0337d704 |
114 | {/if} |
dd502514 |
115 | {if $pro.secteur} |
116 | <div> |
117 | <em>Secteur : </em> |
118 | <strong>{$pro.secteur}{if $pro.ss_secteur} ({$pro.ss_secteur}){/if}</strong> |
119 | </div> |
120 | {/if} |
121 | {if $pro.fonction} |
122 | <div> |
123 | <em>Fonction : </em> <strong>{$pro.fonction}</strong> |
124 | </div> |
125 | {/if} |
126 | {if $pro.poste} |
127 | <div> |
128 | <em>Poste : </em> <strong>{$pro.poste}</strong> |
129 | </div> |
130 | {/if} |
131 | {include file='geoloc/address.tpl' address=$pro no_div=1} |
132 | {/if} |
133 | </td></tr> |
134 | {/foreach} |
0337d704 |
135 | {/if} |
0337d704 |
136 | </table> |
137 | <div class='center'> |
dd502514 |
138 | <input type='hidden' name='user' value='{$smarty.request.user}' /> |
0337d704 |
139 | <input type='submit' name='importe' value='Importer' /> |
140 | </div> |
dd502514 |
141 | {else} |
142 | <div class='center'> |
143 | Le profil actuel est synchronisé avec les données de l'AX. |
144 | </div> |
145 | {/if} |
146 | |
0337d704 |
147 | </form> |
148 | {/if} |
149 | |
150 | {* vim:set et sw=2 sts=2 sws=2: *} |