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_doadd.php
Go to the documentation of this file.
1
<?php
2
/*
3
----------------------------------------------------------------------
4
AlternC - Web Hosting System
5
Copyright (C) 2000-2012 by the AlternC Development Team.
6
https://alternc.org/
7
----------------------------------------------------------------------
8
LICENSE
9
10
This program is free software; you can redistribute it and/or
11
modify it under the terms of the GNU General Public License (GPL)
12
as published by the Free Software Foundation; either version 2
13
of the License, or (at your option) any later version.
14
15
This program is distributed in the hope that it will be useful,
16
but WITHOUT ANY WARRANTY; without even the implied warranty of
17
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
GNU General Public License for more details.
19
20
To read the license please visit http://www.gnu.org/copyleft/gpl.html
21
----------------------------------------------------------------------
22
*/
23
require_once(
"../class/config.php"
);
24
25
if
(!$admin->enabled) {
26
__
(
"This page is restricted to authorized staff"
);
27
exit
;
28
}
29
$fields
= array (
30
"login"
=> array (
"post"
,
"string"
,
""
),
31
"pass"
=> array (
"post"
,
"string"
,
""
),
32
"passconf"
=> array (
"post"
,
"string"
,
""
),
33
"canpass"
=> array (
"post"
,
"integer"
,
""
),
34
"db_server_id"
=> array (
"post"
,
"integer"
,
""
),
35
"notes"
=> array (
"post"
,
"string"
,
""
),
36
"nom"
=> array (
"post"
,
"string"
,
""
),
37
"prenom"
=> array (
"post"
,
"string"
,
""
),
38
"nmail"
=> array (
"post"
,
"string"
,
""
),
39
"type"
=> array (
"post"
,
"string"
,
""
),
40
"create_dom_list"
=> array (
"post"
,
"string"
,
""
),
41
"create_dom"
=> array (
"post"
,
"integer"
, 0),
42
"submit"
=> array (
"post"
,
"string"
,
""
),
43
);
44
getFields
(
$fields
);
45
46
if
($create_dom && !empty($create_dom_list) ) {
47
$dom_to_create = $create_dom_list;
48
}
else
{
49
$dom_to_create =
false
;
50
}
51
52
if
($pass != $passconf) {
53
$error
= _(
"Passwords do not match"
);
54
include(
"adm_add.php"
);
55
exit
();
56
}
57
58
// Attemp to create, exit if fail
59
if
(!($u=$admin->add_mem($login, $pass, $nom, $prenom, $nmail, $canpass, $type, 0, $notes, 0, $dom_to_create, $db_server_id))) {
60
$error
=
$err
->errstr();
61
include (
"adm_add.php"
);
62
exit
;
63
}
64
65
$error
=_(
"The new member has been successfully created"
);
66
67
include(
"adm_list.php"
);
68
exit
;
69
70
?>
code
alternc
bureau
admin
adm_doadd.php
Generated on Mon Mar 24 2014 17:14:20 for Alternc by
1.8.1.2