This repository was archived by the owner on Sep 1, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprofil.php
More file actions
executable file
·157 lines (142 loc) · 5.79 KB
/
profil.php
File metadata and controls
executable file
·157 lines (142 loc) · 5.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<?php
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Copyright (C) 2004 PAROIS Pascal *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
* *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Détail d'un évènement individuel *
* *
* dernière mise à jour : 11/07/2004 *
* En cas de problème : http://www.parois.net *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
$g4p_chemin='';
// en module NPDS, ce fichier est inutile
require_once($g4p_chemin.'p_conf/g4p_config.php');
require_once($g4p_chemin.'p_conf/script_start.php');
require_once($g4p_chemin.'include_sys/sys_functions.php');
if(isset($_GET['langue']) or isset($_GET['theme']) or isset($_GET['place_-1']))
{
if(isset($_GET['langue']))
{
setcookie('genea4p[langue]',$_GET['langue'],time()+$g4p_config['cookie_time_limit'],'/');
$_SESSION['langue']=$_GET['langue'];
}
if(isset($_GET['theme']))
{
setcookie('genea4p[theme]',$_GET['theme'],time()+$g4p_config['cookie_time_limit'],'/');
$_SESSION['theme']=$_GET['theme'];
}
//Davy : ajout profil des lieux
if(isset($_GET['place_0']))
{
unset($_SESSION['place']);
for($i=0;$i<count($g4p_config['subdivision'])&&$_GET['place_'.$i]!=-1;$i++)
{
setcookie('genea4p[place]['.$i.']',$_GET['place_'.$i],time()+$g4p_config['cookie_time_limit'],'/');
$_SESSION['place'][$i]=$_GET['place_'.$i];
}
}
if($_SESSION['g4p_id_membre']!=1)
{
$sql="UPDATE genea_membres SET ";
if(isset($_GET['langue']))
$sql.="langue='".$_GET['langue']."', ";
if(isset($_GET['theme']))
$sql.="theme='".$_GET['theme']."', ";
if(isset($_GET['place_0'])){
$sql.="place='";
for($i=0;$i<count($g4p_config['subdivision']);$i++)
$sql.=$_GET['place_'.$i].",";
$sql=substr($sql,0,-1)."', ";
}
echo $sql=substr($sql,0,-2)." WHERE id=".$_SESSION['g4p_id_membre'];
g4p_db_query($sql);
}
header('location:'.g4p_make_url('','index.php','',0));
exit;
}
require_once($g4p_chemin.'entete.php');
echo '<h2>',$g4p_langue['profil_titre'],'</h2>';
echo '<div class="cadre">';
if($_SESSION['g4p_id_membre']==1)
{
echo '<p>',$g4p_langue['profil_annonyme'],'</p>';
$g4p_result['langue']=$g4p_config['default_lang'];
$g4p_result['theme']=$g4p_config['default_theme'];
}
else
{
$sql="SELECT email, langue, theme, place FROM genea_membres WHERE id=".$_SESSION['g4p_id_membre'];
if($g4p_result=g4p_db_query($sql))
{
if($g4p_result=g4p_db_result($g4p_result))
{
$g4p_result=$g4p_result[0];
echo '<p>',sprintf($g4p_langue['profil_membre'],$g4p_result['email']),'</p>';
}
}
}
echo '<hr />';
echo '<form class="formulaire" method="get" action="',g4p_make_url('','profil.php','',0),'">';
echo '<p><label for="langue">',$g4p_langue['profil_langue'],'</label><select id="langue" name="langue" size="1">';
foreach($g4p_config['langues'] as $key=>$val)
{
if($key==$g4p_result['langue'])
$g4p_select='selected="selected"';
else
$g4p_select='';
echo '<option value="',$key,'" ',$g4p_select,'>',$val,'</option>';
}
echo '</select></p>';
echo '<p><label for="theme">',$g4p_langue['profil_theme'],'</label><select id="theme" name="theme">';
foreach($g4p_config['themes'] as $key=>$val)
{
if($key==$g4p_result['theme'])
$g4p_select='selected="selected"';
else
$g4p_select='';
echo '<option value="',$key,'" ',$g4p_select,'>',$val,'</option>';//syl:debug: utiliser $g4p_select
}
echo '</select></p>';
//Davy : ajout profil des lieux
if(isset($g4p_result['place']))
$place=explode(',',$g4p_result['place']);
else
$place=$_SESSION['place'];
echo '<p>',$g4p_langue['profil_lieu'],'<br />';
for($i=0; $i<count($g4p_config['subdivision']); $i++)
{
echo '<select id="place_',$i,'" name="place_',$i,'">';
echo '<option value="-1"';
if(!isset($place[$i]))
echo ' selected="selected"';
echo '>',$g4p_langue['profil_place_aucun'],'</option>';
foreach($g4p_config['subdivision'] as $key=>$val)
{
if(isset($place[$i])&&$key==$place[$i])
$g4p_select='selected="selected"';
else
$g4p_select='';
echo '<option value="',$key,'" ',$g4p_select,'>',$g4p_langue[$val],'</option>';
}
echo '</select>,';
}
echo '</p><input type="submit" value="',$g4p_langue['submit_enregistrer'],'" /></form>';
echo '</div>';
include($g4p_chemin.'pied_de_page.php');
?>