-
Notifications
You must be signed in to change notification settings - Fork 3
/
edit_utilisateur.php
executable file
·200 lines (199 loc) · 7.56 KB
/
edit_utilisateur.php
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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
<?php
/*
* Factux le facturier libre
* Copyright (C) 2003-2005 Guy Hendrickx, 2017 Thomas Ingles
*
* Licensed under the terms of the GNU General Public License:
* http://opensource.org/licenses/GPL-3.0
*
* For further information visit:
* http://factux.free.fr
*
* File Name: fckconfig.js
* Editor configuration settings.
*
* * * Version: 5.0.0
* * * * Modified: 07/10/2016
*
* File Authors:
* Guy Hendrickx
*.
*/
if(!isset($num_user))
if(isset($_GET['num_user']))
$num_user=$_GET['num_user'];#if redirected with get
include_once("include/headers.php");
include_once("include/finhead.php");
?>
<table width="760" border="0" class="page" align="center">
<tr>
<td class="page" align="center">
<?php
include_once("include/head.php");
if (isset($message)&&$message!='') {
echo $message;
}
if ($user_admin != 'y') {
echo "<h1>$lang_admin_droit</h1>";
exit;
}
$sql = " SELECT * FROM " . $tblpref ."user WHERE num = $num_user ";
$req = mysql_query($sql) or die('Erreur SQL !<br>'.$sql.'<br>'.mysql_error());
while($data = mysql_fetch_array($req)){
$nom = $data['nom'];
$prenom = $data['prenom'];
$login = $data['login'];
$dev = $data['dev'];
$com = $data['com'];
$fact = $data['fact'];
$mail =$data['email'];
$dep = $data['dep'];
$stat = $data['stat'];
$art = $data['art'];
$cli = $data['cli'];
$admin = $data['admin'];
$num_user = $data['num'];
}
?>
<form action="edit_utilisateur_suite.php" method="post" name="utilisateur" id="utilisateur">
<table class='page boiteaction'>
<caption><?php echo $lang_utilisateur_editer; ?></caption>
<tr>
<td class='<?php echo couleur_alternee (); ?>'><?php echo $lang_utilisateur_nom; ?></td>
<td class='<?php echo couleur_alternee (FALSE); ?>'><b><?php echo $login ?></b>
<input type="hidden" name="login2" value="<?php echo $login ?>" />
</td>
</tr>
<tr>
<td class='<?php echo couleur_alternee (); ?>'> <?php echo $lang_nom; ?></td>
<td class='<?php echo couleur_alternee (FALSE); ?>'><input name="nom" type="text" id="nom" value="<?php echo $nom ?>" maxlength="10" /></td>
</tr>
<tr>
<td class='<?php echo couleur_alternee (); ?>'><?php echo $lang_prenom; ?></td>
<td class='<?php echo couleur_alternee (FALSE); ?>'><input name="prenom" type="text" id="prenom" value="<?php echo $prenom ?>" maxlength="20" /></td>
</tr>
<tr>
<td class='<?php echo couleur_alternee (); ?>'><?php echo $lang_motdepasse; ?></td>
<td class='<?php echo couleur_alternee (FALSE); ?>'><input name="pass" type="password" id="pass" maxlength="30" /></td>
</tr>
<tr>
<td class='<?php echo couleur_alternee (); ?>'><?php echo $lang_mot_de_passe; ?></td>
<td class='<?php echo couleur_alternee (FALSE); ?>'><input name="pass2" type="password" id="pass2" maxlength="30" /></td>
</tr>
<tr>
<td class='<?php echo couleur_alternee (); ?>'><?php echo $lang_mail; ?></td>
<td class='<?php echo couleur_alternee (FALSE); ?>'><input name="mail" type="text" id="mail" value="<?php echo $mail ?>" maxlength="30" /></td>
</tr>
<tr>
<th><?php echo $lang_util_droit; ?></th>
<th><?php echo $lang_choisissez; ?></th>
</tr>
<tr>
<td class='<?php echo couleur_alternee (); ?>'><?php echo $lang_ger_dev ?></td>
<td class='<?php echo couleur_alternee (FALSE); ?>'>
<select name ="dev">
<option <?php if($dev =='n'){echo "selected";} ?> value="n"><?php echo $lang_non ?></option>
<option <?php if($dev =='y'){echo "selected";} ?> value="y"><?php echo $lang_oui ?></option>
<option <?php if($dev =='r'){echo "selected";} ?> value="r"><?php echo $lang_restrint ?></option>
</select>
</td>
</tr>
<tr>
<td class='<?php echo couleur_alternee (); ?>'><?php echo $lang_ger_com ?></td>
<td class='<?php echo couleur_alternee (FALSE); ?>'>
<select name ="com">
<option <?php if($com =='n'){echo "selected";} ?> value="n"><?php echo $lang_non ?></option>
<option <?php if($com =='y'){echo "selected";} ?> value="y"><?php echo $lang_oui ?></option>
<option <?php if($com =='r'){echo "selected";} ?> value="r"><?php echo $lang_restrint ?></option>
</select>
</td>
</tr>
<tr>
<td class='<?php echo couleur_alternee (); ?>'><?php echo $lang_ger_fact ?></td>
<td class='<?php echo couleur_alternee (FALSE); ?>'>
<select name ="fact">
<option <?php if($fact =='n'){echo "selected";} ?> value="n"><?php echo $lang_non ?></option>
<option <?php if($fact =='y'){echo "selected";} ?> value="y"><?php echo $lang_oui ?></option>
<option <?php if($fact =='r'){echo "selected";} ?> value="r"><?php echo $lang_restrint ?></option>
</select>
</td>
</tr>
<tr>
<td class='<?php echo couleur_alternee (); ?>'><?php echo $lang_ger_dep ?></td>
<td class='<?php echo couleur_alternee (FALSE); ?>'>
<select name ="dep">
<option <?php if($dep =='n'){echo "selected";} ?> value="n"><?php echo $lang_non ?></option>
<option <?php if($dep =='y'){echo "selected";} ?> value="y"><?php echo $lang_oui ?></option>
</select>
</td>
</tr>
<tr>
<td class='<?php echo couleur_alternee (); ?>'><?php echo $lang_ger_stat ?></td>
<td class='<?php echo couleur_alternee (FALSE); ?>'>
<select name ="stat">
<option <?php if($stat =='n'){echo "selected";} ?> value="n"><?php echo $lang_non ?></option>
<option <?php if($stat =='y'){echo "selected";} ?> value="y"><?php echo $lang_oui ?></option>
</select>
</td>
</tr>
<tr>
<td class='<?php echo couleur_alternee (); ?>'><?php echo $lang_ger_art ?></td>
<td class='<?php echo couleur_alternee (FALSE); ?>'>
<select name ="art">
<option <?php if($art =='n'){echo "selected";} ?> value="n"><?php echo $lang_non ?></option>
<option <?php if($art =='y'){echo "selected";} ?> value="y"><?php echo $lang_oui ?></option>
</select>
</td>
</tr>
<tr>
<td class='<?php echo couleur_alternee (); ?>'><?php echo $lang_ger_cli ?></td>
<td class='<?php echo couleur_alternee (FALSE); ?>'>
<select name ="cli">
<option <?php if($cli =='n'){echo "selected";} ?> value="n"><?php echo $lang_non ?></option>
<option <?php if($cli =='y'){echo "selected";} ?> value="y"><?php echo $lang_oui ?></option>
</select>
</td>
</tr>
<tr>
<td class='<?php echo couleur_alternee (); ?>'><?php echo $lang_dr_admi ?><br><?php echo $lang_admi_modu ?></td>
<td class='<?php echo couleur_alternee (FALSE); ?>'>
<select name ="admin">
<option <?php if($admin =='n'){echo "selected";} ?> value="n"><?php echo $lang_non ?></option>
<option <?php if($admin =='y'){echo "selected";} ?> value="y"><?php echo $lang_oui ?></option>
</select>
</td>
</tr>
<tr>
<td class="submit" colspan="3">
<input type="submit" name="Submit" value="<?php echo $lang_modifier; ?>" />
<input name="reset" type="reset" id="reset" value="<?php echo $lang_val_actu; ?>" />
<input type="hidden" name="num_user" value="<?php echo $num_user ?>" />
</td>
</tr>
</table>
</form>
</td>
</tr>
<tr>
<td>
<?php
if ($fact == 'r' || $com == 'r' || $dev == 'r' ){
include("edit_choix_cli.php");
include("lister_clients_restreint.php");
?>
</td>
</tr>
<tr>
<td>
<?php
}#fi fact,com,dev
$aide='utilisateurs';
include("help.php");
include_once("include/bas.php");
?>
</td>
</tr>
</table>
</body>
</html>