Alternc
3.2
Alternc logiel libre pour l'hébergement
Main Page
Related Pages
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Pages
adm_doedit.php
Go to the documentation of this file.
1
<?php
2
/*
3
$Id: adm_doedit.php,v 1.6 2006/01/24 05:03:30 joe Exp $
4
----------------------------------------------------------------------
5
AlternC - Web Hosting System
6
Copyright (C) 2006 Le réseau Koumbit Inc.
7
http://koumbit.org/
8
Copyright (C) 2002 by the AlternC Development Team.
9
http://alternc.org/
10
----------------------------------------------------------------------
11
Based on:
12
Valentin Lacambre's web hosting softwares: http://altern.org/
13
----------------------------------------------------------------------
14
LICENSE
15
16
This program is free software; you can redistribute it and/or
17
modify it under the terms of the GNU General Public License (GPL)
18
as published by the Free Software Foundation; either version 2
19
of the License, or (at your option) any later version.
20
21
This program is distributed in the hope that it will be useful,
22
but WITHOUT ANY WARRANTY; without even the implied warranty of
23
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24
GNU General Public License for more details.
25
26
To read the license please visit http://www.gnu.org/copyleft/gpl.html
27
----------------------------------------------------------------------
28
Original Author of file: Benjamin Sonntag
29
Purpose of file: Edit a member's parameters
30
----------------------------------------------------------------------
31
*/
32
require_once(
"../class/config.php"
);
33
34
if
(!$admin->enabled) {
35
__
(
"This page is restricted to authorized staff"
);
36
exit
();
37
}
38
39
$subadmin
=
variable_get
(
"subadmin_restriction"
);
40
41
$fields
= array (
42
"uid"
=> array (
"request"
,
"integer"
, 0),
43
"enabled"
=> array (
"request"
,
"boolean"
,
true
),
44
"pass"
=> array (
"request"
,
"string"
,
""
),
45
"passconf"
=> array (
"request"
,
"string"
,
""
),
46
"canpass"
=> array (
"request"
,
"boolean"
,
true
),
47
"notes"
=> array (
"request"
,
"string"
,
""
),
48
"nom"
=> array (
"request"
,
"string"
,
""
),
49
"prenom"
=> array (
"request"
,
"string"
,
""
),
50
"nmail"
=> array (
"request"
,
"string"
,
""
),
51
"type"
=> array (
"request"
,
"string"
,
""
),
52
"duration"
=> array (
"request"
,
"integer"
, 0),
53
"reset_quotas"
=> array (
"request"
,
"string"
,
false
),
54
);
55
getFields
(
$fields
);
56
57
58
if
(
$subadmin
==0 && !$admin->checkcreator(
$uid
)) {
59
__
(
"This page is restricted to authorized staff"
);
60
exit
();
61
}
62
63
if
($pass != $passconf) {
64
$error
= _(
"Passwords do not match"
);
65
include(
"adm_edit.php"
);
66
exit
();
67
}
68
// When changing its own account, enabled forced to 1.
69
if
(
$uid
==
$mem
->user[
"uid"
]) {
70
$enabled=1;
71
}
72
73
if
(!$admin->update_mem(
$uid
, $nmail, $nom, $prenom, $pass, $enabled, $canpass, $type, $duration, $notes, $reset_quotas)){
74
$error
=
$err
->errstr();
75
include(
"adm_edit.php"
);
76
}
else
{
77
$error
=_(
"The member has been successfully edited"
);
78
include(
"adm_list.php"
);
79
}
80
?>
code
alternc
bureau
admin
adm_doedit.php
Generated on Mon Mar 24 2014 17:14:20 for Alternc by
1.8.1.2