26 require_once(
"../class/config.php");
27 include_once(
"head.php");
29 if (!$admin->enabled) {
30 $msg->raise(
"ERROR",
"admin", _(
"This page is restricted to authorized staff"));
31 echo
$msg->msg_html_all();
36 "canpass" => array (
"post",
"integer", 1),
37 "login" => array (
"post",
"string",
null),
38 "pass" => array (
"post",
"string",
null),
39 "passconf" => array (
"post",
"string",
null),
40 "notes" => array (
"post",
"string",
null),
41 "nom" => array (
"post",
"string",
null),
42 "prenom" => array (
"post",
"string",
null),
43 "nmail" => array (
"post",
"string",
null),
44 "create_dom" => array (
"post",
"integer", 0),
48 $c=$admin->listPasswordPolicies();
52 <h3><?php
__(
"New AlternC account"); ?></h3>
56 echo
$msg->msg_html_all();
58 <form method=
"post" action=
"adm_doadd.php" id=
"main" name=
"main" autocomplete=
"off">
62 <tr><th><label
for=
"login"><?php
__(
"Username"); ?></label><span
class=
"mandatory">*</span></th><td>
63 <input type=
"text" class=
"int" name=
"login" id=
"login" autocomplete=
"off" value=
"<?php ehe($login); ?>" size=
"20" maxlength=
"16" />
66 <th><label
for=
"pass"><?php
__(
"Initial password"); ?></label><span
class=
"mandatory">*</span></th>
70 <th><label
for=
"passconf"><?php
__(
"Confirm password"); ?></label><span
class=
"mandatory">*</span></th>
71 <td><input type=
"password" id=
"passconf" name=
"passconf" autocomplete=
"off" class=
"int" value=
"<?php ehe($passconf); ?>" size=
"20" maxlength=
"64" /></td>
74 <th><label><?php
__(
"Can he change its password"); ?></label></th>
76 <input type=
"radio" class=
"inc" id=
"canpass0" name=
"canpass" value=
"0"<?php
cbox($canpass==0); ?>/><label
for=
"canpass0"><?php
__(
"No"); ?></label><br />
77 <input type=
"radio" class=
"inc" id=
"canpass1" name=
"canpass" value=
"1"<?php
cbox($canpass==1); ?>/><label
for=
"canpass1"><?php
__(
"Yes"); ?></label><br />
81 <th><label
for=
"notes"><?php
__(
"Notes"); ?></label></th>
82 <td><textarea name=
"notes" id=
"notes" class=
"int" cols=
"32" rows=
"5"><?php
ehe($notes); ?></textarea></td>
85 <th><label
for=
"nom"><?php echo _(
"Surname").
"</label> / <label for=\"prenom\">"._(
"First Name"); ?></label></th>
86 <td><input
class=
"int" type=
"text" id=
"nom" name=
"nom" value=
"<?php ehe($nom); ?>" size=
"16" maxlength=
"128" /> / <input type=
"text" name=
"prenom" id=
"prenom" value=
"<?php ehe($prenom); ?>" class=
"int" size=
"16" maxlength=
"128" /></td>
89 <th><label
for=
"nmail"><?php
__(
"Email address"); ?></label><span
class=
"mandatory">*</span></th>
90 <td><input type=
"text" name=
"nmail" id=
"nmail" class=
"int" value=
"<?php ehe($nmail); ?>" size=
"30" maxlength=
"128" /></td>
93 <th><label
for=
"type"><?php
__(
"Account type"); ?></label></th>
94 <td><select name=
"type" id=
"type" class=
"inl">
96 eoption($quota->listtype(),
'default',
true);
103 __(
"Associate this new user to this database server:");
105 echo
"<i>"._(
"Warning: you can't change it after the creation of the user.").
"</i>";
109 echo
"<select name='db_server_id' id='db_server_id' >";
110 foreach ($mysql->list_db_servers() as $ldb ) {
111 echo
"<option value='".$ldb[
'id'].
"'>".$ldb[
'name'].
"</option>";
121 <input type=
"checkbox" name=
"create_dom" value=
"1" class=
"inc" id=
"create_dom" <?php
cbox($create_dom==1); ?>/>
122 <label
for=
"create_dom"><?php printf(_(
"Install the domain"),
""); ?></label>
123 <span
class=
"int" id=
"create_dom_list_pfx">login.</span><select name=
"create_dom_list" class=
"int" id=
"create_dom_list">
125 <option value=
"<?php echo variable_get('hosting_tld'); ?>" selected=
"selected"><?php echo
variable_get(
'hosting_tld'); ?></option>
131 <option value=
"<?php echo $val; ?>" > <?php echo
$val?> </option>
137 <tr
class=
"trbtn"><td colspan=
"2">
138 <input type=
"submit" class=
"inb ok" name=
"submit" value=
"<?php __("Create
this AlternC account
"); ?>" />
139 <input type=
"button" class=
"inb cancel" name=
"cancel" value=
"<?php __("Cancel
"); ?>" onclick=
"document.location='adm_list.php'" />
143 <script type=
"text/javascript">
144 document.forms[
'main'].login.focus();
147 <?php include_once(
"foot.php"); ?>
if(! $admin->enabled) $fields
Form to add a new account to AlternC.
variable_get($name, $default=null, $createit_comment=null)
Return a persistent variable.
const DEFAULT_PASS_SIZE
Define constants from vars of /etc/alternc/local.sh The you can't choose where is the AlternC Panel.
display_div_generate_password($pass_size=DEFAULT_PASS_SIZE, $fields_to_fill1="", $fields_to_fill2="", $classcount=3)
Show a button to set a random password for a password field.
eoption($values, $cur, $onedim=false)
select_values($arr,$cur) echo des <option> du tableau $values ou de la table sql $values selectionne ...
ehe($str, $display=TRUE)
Echo the HTMLSpecialChars version of a value.
selected($bool, $echo=TRUE)
ECHOes selected="selected" only if the parameter is true useful for checkboxes and radio buttons.
cbox($test, $echo=true)
ECHOes checked="checked" only if the parameter is true useful for checkboxes and radio buttons.
getFields($fields, $requestOnly=false)
Get the Fields of the posted form from $_REQUEST or POST or GET and check their type.
csrf_get($return=false)
Give a new CSRF uniq token for a form the session must be up since the CSRF is linked to the session ...
if(empty($_POST['key'])||empty($_POST['val'])) $key