26 require_once(
"../class/config.php");
27 include_once(
"head.php");
31 "id" => array (
"request",
"integer",
""),
32 "create" => array (
"get",
"integer",
"0"),
33 "dir" => array (
"get",
"string",
"0"),
39 $msg->raise(
"ERROR",
"ftp", _(
"Neither a creation nor a edition"));
40 echo
"<h3>"._(
"Create a FTP account").
"</h3>";
41 echo
$msg->msg_html_all();
42 include_once(
"foot.php");
47 echo
"<h3>"._(
"Create a FTP account").
"</h3>";
51 echo
"<h3>"._(
"Editing a FTP account").
"</h3>";
55 echo
$msg->msg_html_all();
57 $c=$admin->listPasswordPolicies();
61 <form method=
"post" action=
"ftp_doedit.php" name=
"main" id=
"main" autocomplete=
"off">
63 <!-- honeypot fields -->
64 <input type=
"text" style=
"display: none" id=
"fakeUsername" name=
"fakeUsername" value=
"" />
65 <input type=
"password" style=
"display: none" id=
"fakePassword" name=
"fakePassword" value=
"" />
67 <input type=
"hidden" name=
"id" value=
"<?php ehe($id); ?>" />
68 <input type=
"hidden" name=
"create" value=
"<?php ehe($create); ?>" />
69 <table border=
"1" cellspacing=
"0" cellpadding=
"4" class=
"tedit">
71 <th><label
for=
"login"><?php
__(
"Username"); ?></label></th>
72 <td><select
class=
"inl" name=
"prefixe"><?php $ftp->select_prefix_list(
$rr[0][
"prefixe"]); ?></select> <b>_</b> <input type=
"text" class=
"int" name=
"login" id=
"login" value=
"<?php ehe($rr[0]["login
"]); ?>" size=
"20" maxlength=
"64" /></td>
75 <th><label
for=
"dir"><?php
__(
"Folder"); ?></label></th>
77 <input type=
"text" class=
"int" name=
"dir" id=
"dir" value=
"<?php empty($dir)?ehe("/
".$rr[0]["dir
"]):ehe($dir); ?>" size=
"20" maxlength=
"64" />
79 <p><?php
__(
"This is the root folder for this FTP user. i.e. this FTP user can access to this folder and all its sub-folders."); ?></p>
83 <tr
id=
'ftp_tr_pass1'>
84 <th><label
for=
"pass"><?php
__(
"Password"); ?></label></th>
87 <tr
id=
'ftp_tr_pass2'>
88 <th><label
for=
"passconf"><?php
__(
"Confirm password"); ?></label></th>
89 <td><input type=
"password" class=
"int" name=
"passconf" autocomplete=
"off" id=
"passconf" size=
"20" maxlength=
"64" value=
""/></td>
91 <tr
id=
'ftp_tr_editpass' style=
'display: none;'>
92 <th><label
for=
"pass"><?php
__(
"Password"); ?></label></th>
93 <td><a href=
"javascript:ftp_edit_pass_toggle();"><?php
__(
"Click here if you want to edit password");?></a></td>
97 <input type=
"submit" class=
"inb ok" name=
"submit" value=
"<?php __("Save
"); ?>" onclick=
'return ftp_check_pass();' />
98 <input type=
"button" class=
"inb cancel" name=
"cancel" value=
"<?php __("Cancel
"); ?>" onclick=
"document.location='ftp_list.php'"/>
102 <script type=
"text/javascript">
103 document.forms[
'main'].login.focus();
105 function ftp_edit_pass_toggle() {
106 $(
'#ftp_tr_pass1').toggle();
107 $(
'#ftp_tr_pass2').toggle();
108 $(
'#ftp_tr_editpass').toggle();
111 function ftp_check_pass() {
112 if ( $(
'#pass').val() != $(
'#passconf').val() ) {
113 alert(
'<?php __("Password do not match"); ?>');
116 if ( $(
'#pass').val() ==
'' ) {
118 if ( <?php echo (isset(
$id) && ! empty(
$id))?
'true':
'false' ?> ) {
return true ; }
119 alert(
'<?php __("Please enter a password"); ?>');
129 echo
'<script type="text/javascript">ftp_edit_pass_toggle();</script>';
132 include_once(
"foot.php");
if(! $r=$aws->get_list()) $create
const DEFAULT_PASS_SIZE
Define constants from vars of /etc/alternc/local.sh The you can't choose where is the AlternC Panel.
return true
if you do not wish to use encryption via TLS mechanisms (i.e.
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.
display_browser($dir="", $caller="main.dir", $width=350, $height=450)
Show a button to select a folder on the server.
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(!isset($is_include)) if(! $key &&! $crt) $id