parent
e3772abacb
commit
cfd495d1f2
|
@ -150,9 +150,7 @@ bureau/admin/dom_substatus.php -text
|
||||||
bureau/admin/domlist.php -text
|
bureau/admin/domlist.php -text
|
||||||
bureau/admin/favicon.ico -text
|
bureau/admin/favicon.ico -text
|
||||||
bureau/admin/foot.php -text
|
bureau/admin/foot.php -text
|
||||||
bureau/admin/ftp_add.php -text
|
|
||||||
bureau/admin/ftp_del.php -text
|
bureau/admin/ftp_del.php -text
|
||||||
bureau/admin/ftp_doadd.php -text
|
|
||||||
bureau/admin/ftp_doedit.php -text
|
bureau/admin/ftp_doedit.php -text
|
||||||
bureau/admin/ftp_edit.php -text
|
bureau/admin/ftp_edit.php -text
|
||||||
bureau/admin/ftp_list.php -text
|
bureau/admin/ftp_list.php -text
|
||||||
|
|
|
@ -588,7 +588,7 @@ else {
|
||||||
else {
|
else {
|
||||||
?>
|
?>
|
||||||
<span class="ina">
|
<span class="ina">
|
||||||
<a href="ftp_add.php?dir=<?php ehe($R); ?>"><?php __("Create an ftp account in this folder"); ?></a>
|
<a href="ftp_edit.php?create=1&dir=<?php ehe($R); ?>"><?php __("Create an ftp account in this folder"); ?></a>
|
||||||
</span>
|
</span>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,83 +0,0 @@
|
||||||
<?php
|
|
||||||
/*
|
|
||||||
$Id: ftp_add.php,v 1.5 2006/01/12 01:10:48 anarcat Exp $
|
|
||||||
----------------------------------------------------------------------
|
|
||||||
AlternC - Web Hosting System
|
|
||||||
Copyright (C) 2002 by the AlternC Development Team.
|
|
||||||
http://alternc.org/
|
|
||||||
----------------------------------------------------------------------
|
|
||||||
Based on:
|
|
||||||
Valentin Lacambre's web hosting softwares: http://altern.org/
|
|
||||||
----------------------------------------------------------------------
|
|
||||||
LICENSE
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU General Public License (GPL)
|
|
||||||
as published by the Free Software Foundation; either version 2
|
|
||||||
of the License, or (at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
To read the license please visit http://www.gnu.org/copyleft/gpl.html
|
|
||||||
----------------------------------------------------------------------
|
|
||||||
Original Author of file: Benjamin Sonntag
|
|
||||||
Purpose of file: Ask the required values to add a ftp account
|
|
||||||
----------------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
require_once("../class/config.php");
|
|
||||||
include_once("head.php");
|
|
||||||
|
|
||||||
if (!$quota->cancreate("ftp")) {
|
|
||||||
$error=_("You cannot add any new ftp account, your quota is over.");
|
|
||||||
$fatal=1;
|
|
||||||
}
|
|
||||||
|
|
||||||
$fields = array (
|
|
||||||
"id" => array ("post", "integer", 0),
|
|
||||||
"prefixe" => array ("post", "string", ""),
|
|
||||||
"login" => array ("post", "string", ""),
|
|
||||||
"dir" => array ("post", "string", ""),
|
|
||||||
"pass" => array ("post", "string", ""),
|
|
||||||
"passconf" => array ("post", "string", ""),
|
|
||||||
"submit" => array ("post", "string", ""),
|
|
||||||
);
|
|
||||||
getFields($fields);
|
|
||||||
|
|
||||||
|
|
||||||
?>
|
|
||||||
<h3><?php __("Create a new ftp account"); ?></h3>
|
|
||||||
<hr id="topbar"/>
|
|
||||||
<br />
|
|
||||||
<?php
|
|
||||||
if (isset($error) && $error) {
|
|
||||||
echo "<p class=\"error\">$error</p>";
|
|
||||||
if (isset($fatal) && $fatal) {
|
|
||||||
include_once("foot.php");
|
|
||||||
exit();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<form method="post" action="ftp_doadd.php" name="main" id="main">
|
|
||||||
<table class="tedit">
|
|
||||||
<tr><th><input type="hidden" name="id" value="<?php echo $id ?>" />
|
|
||||||
<label for="login"><?php __("Username"); ?></label></th><td>
|
|
||||||
<select class="inl" name="prefixe"><?php $ftp->select_prefix_list($prefixe); ?></select> <b>_</b> <input type="text" class="int" name="login" id="login" value="" size="20" maxlength="64" />
|
|
||||||
</td></tr>
|
|
||||||
<tr><th><label for="dir"><?php __("Folder"); ?></label></th><td><input type="text" class="int" name="dir" id="dir" value="" size="20" maxlength="255" /></td></tr>
|
|
||||||
<tr><th><label for="pass"><?php __("Password"); ?></label></th><td><input type="password" class="int" name="pass" id="pass" value="" size="20" maxlength="64" /><?php display_div_generate_password(); ?></td></tr>
|
|
||||||
<tr><th><label for="passconf"><?php __("Confirm password"); ?></label></th><td><input type="password" class="int" name="passconf" id="passconf" value="" size="20" maxlength="64" /></td></tr>
|
|
||||||
<tr class="trbtn"><td colspan="2">
|
|
||||||
<input type="submit" class="inb" name="submit" value="<?php __("Create this new FTP account."); ?>" />
|
|
||||||
<input type="button" class="inb" name="cancel" value="<?php __("Cancel"); ?>" onclick="document.location='ftp_list.php'"/>
|
|
||||||
</td></tr>
|
|
||||||
</table>
|
|
||||||
</form>
|
|
||||||
<?php $mem->show_help("ftp_add"); ?>
|
|
||||||
<script type="text/javascript">
|
|
||||||
document.forms['main'].login.focus();
|
|
||||||
document.forms['main'].setAttribute('autocomplete', 'off');
|
|
||||||
</script>
|
|
||||||
<?php include_once("foot.php"); ?>
|
|
|
@ -1,57 +0,0 @@
|
||||||
<?php
|
|
||||||
/*
|
|
||||||
$Id: ftp_doadd.php,v 1.2 2006/01/12 01:10:48 anarcat Exp $
|
|
||||||
----------------------------------------------------------------------
|
|
||||||
AlternC - Web Hosting System
|
|
||||||
Copyright (C) 2002 by the AlternC Development Team.
|
|
||||||
http://alternc.org/
|
|
||||||
----------------------------------------------------------------------
|
|
||||||
Based on:
|
|
||||||
Valentin Lacambre's web hosting softwares: http://altern.org/
|
|
||||||
----------------------------------------------------------------------
|
|
||||||
LICENSE
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU General Public License (GPL)
|
|
||||||
as published by the Free Software Foundation; either version 2
|
|
||||||
of the License, or (at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
To read the license please visit http://www.gnu.org/copyleft/gpl.html
|
|
||||||
----------------------------------------------------------------------
|
|
||||||
Original Author of file: Benjamin Sonntag
|
|
||||||
Purpose of file: Create a new ftp account
|
|
||||||
----------------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
require_once("../class/config.php");
|
|
||||||
|
|
||||||
$fields = array (
|
|
||||||
"prefixe" => array ("post", "string", ""),
|
|
||||||
"login" => array ("post", "string", ""),
|
|
||||||
"dir" => array ("post", "string", ""),
|
|
||||||
"pass" => array ("post", "string", ""),
|
|
||||||
"passconf" => array ("post", "string", ""),
|
|
||||||
);
|
|
||||||
getFields($fields);
|
|
||||||
|
|
||||||
if ($pass != $passconf) {
|
|
||||||
$error = _("Passwords do not match");
|
|
||||||
include("ftp_add.php");
|
|
||||||
exit();
|
|
||||||
}
|
|
||||||
|
|
||||||
$r=$ftp->add_ftp($prefixe,$login,$pass,$dir);
|
|
||||||
if (!$r) {
|
|
||||||
$error=$err->errstr();
|
|
||||||
include("ftp_add.php");
|
|
||||||
exit();
|
|
||||||
} else {
|
|
||||||
$error=_("The FTP account has been successfully created");
|
|
||||||
include("ftp_list.php");
|
|
||||||
exit();
|
|
||||||
}
|
|
||||||
?>
|
|
|
@ -30,6 +30,7 @@
|
||||||
require_once("../class/config.php");
|
require_once("../class/config.php");
|
||||||
$fields = array (
|
$fields = array (
|
||||||
"id" => array ("post", "integer", ""),
|
"id" => array ("post", "integer", ""),
|
||||||
|
"create" => array ("post", "integer", ""),
|
||||||
"pass" => array ("post", "string", ""),
|
"pass" => array ("post", "string", ""),
|
||||||
"passconf" => array ("post", "string", ""),
|
"passconf" => array ("post", "string", ""),
|
||||||
"prefixe" => array ("post", "string", ""),
|
"prefixe" => array ("post", "string", ""),
|
||||||
|
@ -39,25 +40,32 @@ $fields = array (
|
||||||
getFields($fields);
|
getFields($fields);
|
||||||
|
|
||||||
|
|
||||||
if (!$id) {
|
if ($pass != $passconf) {
|
||||||
$error=_("No account selected!");
|
$error = _("Passwords do not match");
|
||||||
} else {
|
include("ftp_edit.php");
|
||||||
if ($pass != $passconf) {
|
exit();
|
||||||
$error = _("Passwords do not match");
|
}
|
||||||
include("ftp_edit.php");
|
|
||||||
exit();
|
|
||||||
}
|
|
||||||
|
|
||||||
$r=$ftp->put_ftp_details($id,$prefixe,$login,$pass,$dir);
|
if (! $id && !$create) { //not a creation and not an edit
|
||||||
if (!$r) {
|
$error=_("Error: neither a creation nor an edition");
|
||||||
$error=$err->errstr();
|
include("ftp_list.php");
|
||||||
include("ftp_edit.php");
|
exit();
|
||||||
exit();
|
}
|
||||||
} else {
|
|
||||||
$error=_("The ftp account has been successfully changed");
|
if (! $id ) { //create
|
||||||
include("ftp_list.php");
|
$r=$ftp->add_ftp($prefixe,$login,$pass,$dir);
|
||||||
exit();
|
} else { // edit
|
||||||
}
|
$r=$ftp->put_ftp_details($id,$prefixe,$login,$pass,$dir);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$r) {
|
||||||
|
$error=$err->errstr();
|
||||||
|
include("ftp_edit.php");
|
||||||
|
exit();
|
||||||
|
} else {
|
||||||
|
$error=_("The ftp account has been successfully changed");
|
||||||
|
include("ftp_list.php");
|
||||||
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
include_once("head.php");
|
include_once("head.php");
|
||||||
|
|
|
@ -31,20 +31,29 @@ require_once("../class/config.php");
|
||||||
include_once("head.php");
|
include_once("head.php");
|
||||||
|
|
||||||
$fields = array (
|
$fields = array (
|
||||||
"id" => array ("request", "integer", ""),
|
"id" => array ("request", "integer", ""),
|
||||||
|
"create" => array ("get", "integer", "0"),
|
||||||
|
"dir" => array ("get", "string", "0"),
|
||||||
);
|
);
|
||||||
getFields($fields);
|
getFields($fields);
|
||||||
|
|
||||||
if (!$id) {
|
if (!$id && !$create) {
|
||||||
$error=_("No account selected!");
|
$error=_("Neither a creation nor a edition");
|
||||||
} else {
|
include_once("foot.php");
|
||||||
$r=$ftp->get_ftp_details($id);
|
exit();
|
||||||
if (!$r) {
|
|
||||||
$error=$err->errstr();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!$id && $create) { //creation
|
||||||
|
echo "<h3>"._("Create a FTP account")."</h3>";
|
||||||
|
} else {
|
||||||
|
echo "<h3>"._("Editing a FTP account")."</h3>";
|
||||||
|
$r=$ftp->get_ftp_details($id);
|
||||||
|
if (!$r) {
|
||||||
|
$error=$err->errstr();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<h3><?php __("Editing an FTP account"); ?></h3>
|
|
||||||
<?php
|
<?php
|
||||||
if (isset($error) && $error) {
|
if (isset($error) && $error) {
|
||||||
echo "<p class=\"error\">$error</p>";
|
echo "<p class=\"error\">$error</p>";
|
||||||
|
@ -55,10 +64,11 @@ if (isset($error) && $error) {
|
||||||
<form method="post" action="ftp_doedit.php" name="main" id="main">
|
<form method="post" action="ftp_doedit.php" name="main" id="main">
|
||||||
<table border="1" cellspacing="0" cellpadding="4" class="tedit">
|
<table border="1" cellspacing="0" cellpadding="4" class="tedit">
|
||||||
<tr><th><input type="hidden" name="id" value="<?php echo $id ?>" />
|
<tr><th><input type="hidden" name="id" value="<?php echo $id ?>" />
|
||||||
|
<tr><th><input type="hidden" name="create" value="<?php echo $create ?>" />
|
||||||
<label for="login"><?php __("Username"); ?></label></th><td>
|
<label for="login"><?php __("Username"); ?></label></th><td>
|
||||||
<select class="inl" name="prefixe"><?php $ftp->select_prefix_list($r["prefixe"]); ?></select> <b>_</b> <input type="text" class="int" name="login" id="login" value="<?php ehe($r[0]["login"]); ?>" size="20" maxlength="64" />
|
<select class="inl" name="prefixe"><?php @$ftp->select_prefix_list($r["prefixe"]); ?></select> <b>_</b> <input type="text" class="int" name="login" id="login" value="<?php @ehe($r[0]["login"]); ?>" size="20" maxlength="64" />
|
||||||
</td></tr>
|
</td></tr>
|
||||||
<tr><th><label for="dir"><?php __("Folder"); ?></label></th><td><input type="text" class="int" name="dir" id="dir" value="<?php ehe("/".$r[0]["dir"]); ?>" size="20" maxlength="64" />
|
<tr><th><label for="dir"><?php __("Folder"); ?></label></th><td><input type="text" class="int" name="dir" id="dir" value="<?php empty($dir)?@ehe("/".$r[0]["dir"]):@ehe($dir); ?>" size="20" maxlength="64" />
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
<!--
|
<!--
|
||||||
|
@ -70,7 +80,7 @@ if (isset($error) && $error) {
|
||||||
<tr><th><label for="passconf"><?php __("Confirm password"); ?></label></th><td><input type="password" class="int" name="passconf" id="passconf" size="20" maxlength="64" value=""/></td></tr>
|
<tr><th><label for="passconf"><?php __("Confirm password"); ?></label></th><td><input type="password" class="int" name="passconf" id="passconf" size="20" maxlength="64" value=""/></td></tr>
|
||||||
|
|
||||||
<tr class="trbtn"><td colspan="2">
|
<tr class="trbtn"><td colspan="2">
|
||||||
<input type="submit" class="inb" name="submit" value="<?php __("Change this FTP account"); ?>" />
|
<input type="submit" class="inb" name="submit" value="<?php __("Save"); ?>" />
|
||||||
<input type="button" class="inb" name="cancel" value="<?php __("Cancel"); ?>" onclick="document.location='ftp_list.php'"/>
|
<input type="button" class="inb" name="cancel" value="<?php __("Cancel"); ?>" onclick="document.location='ftp_list.php'"/>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -54,7 +54,7 @@ if (isset($error) && $error && !$noftp) {
|
||||||
|
|
||||||
<?php if ($quota->cancreate("ftp")) { ?>
|
<?php if ($quota->cancreate("ftp")) { ?>
|
||||||
<p>
|
<p>
|
||||||
<span class="inb"><a href="ftp_add.php"><?php __("Create a new ftp account"); ?></a></span>
|
<span class="inb"><a href="ftp_edit.php?create=1"><?php __("Create a new ftp account"); ?></a></span>
|
||||||
</p>
|
</p>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ if ($q["t"] > 0 || $q['u'] > 0) {
|
||||||
<div class="menu-content" id="menu-ftp">
|
<div class="menu-content" id="menu-ftp">
|
||||||
<ul>
|
<ul>
|
||||||
<?php if ($quota->cancreate("ftp")) { ?>
|
<?php if ($quota->cancreate("ftp")) { ?>
|
||||||
<li><a href="ftp_add.php"><img src="images/new.png" alt="<?php __("Create a new ftp account"); ?>" /> <?php __("Create a new ftp account"); ?></a></li>
|
<li><a href="ftp_edit.php?create=1"><img src="images/new.png" alt="<?php __("Create a new ftp account"); ?>" /> <?php __("Create a new ftp account"); ?></a></li>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<li><a href="ftp_list.php"><?php __("FTP accounts list"); ?></a></li>
|
<li><a href="ftp_list.php"><?php __("FTP accounts list"); ?></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
Loading…
Reference in New Issue