0337d704 |
1 | <?php |
2 | /*************************************************************************** |
5ddeb07c |
3 | * Copyright (C) 2003-2007 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 | if ($appli_id1>0) |
cab08090 |
23 | XDB::execute("REPLACE INTO applis_ins SET uid= {?}, aid = {?}, type = {?}, ordre = 0", S::v('uid', -1), $appli_id1, $appli_type1); |
0337d704 |
24 | else |
cab08090 |
25 | XDB::execute("DELETE FROM applis_ins WHERE uid= {?} AND ordre=0", S::v('uid', -1)); |
0337d704 |
26 | |
27 | if ($appli_id2>0) |
cab08090 |
28 | XDB::execute("REPLACE INTO applis_ins SET uid= {?}, aid = {?}, type = {?}, ordre = 1", S::v('uid', -1), $appli_id2, $appli_type2); |
0337d704 |
29 | else |
cab08090 |
30 | XDB::execute("DELETE FROM applis_ins WHERE uid= {?} AND ordre=1", S::v('uid', -1)); |
0337d704 |
31 | |
32 | if ($nationalite != $nationalite_anc || $nom != $nom_anc || $prenom != $prenom_anc) { |
33 | $sql = "UPDATE auth_user_md5 |
34 | SET nationalite= {?}, |
35 | nom = {?}, |
36 | prenom = {?} WHERE user_id= {?}"; |
cab08090 |
37 | XDB::execute($sql, $nationalite, $nom, $prenom, S::v('uid', -1)); |
0337d704 |
38 | } |
08cce2ff |
39 | XDB::execute( |
0337d704 |
40 | "UPDATE auth_user_quick SET |
41 | profile_nick={?}, |
42 | profile_mobile={?}, profile_mobile_pub={?}, |
43 | profile_web={?}, profile_web_pub={?}, |
3b3e9d15 |
44 | profile_freetext={?}, profile_freetext_pub={?}, |
45 | profile_from_ax = {?} |
0337d704 |
46 | WHERE user_id = {?}", |
47 | $nickname, |
48 | $mobile, $mobile_pub, |
49 | $web, $web_pub, |
50 | $freetext, $freetext_pub, |
3b3e9d15 |
51 | $synchro_ax, |
cab08090 |
52 | S::v('uid', -1)); |
0337d704 |
53 | |
54 | if ($nickname != $nickname_anc) { |
55 | require_once('user.func.inc.php'); |
cab08090 |
56 | user_reindex(S::v('uid', -1)); |
0337d704 |
57 | } |
cab08090 |
58 | XDB::execute("UPDATE photo SET pub = {?} WHERE uid = {?}", $photo_pub, S::v('uid', -1)); |
a7de4ef7 |
59 | // vim:set et sws=4 sts=4 sw=4 enc=utf-8: |
0337d704 |
60 | ?> |