2006-04-26 12:28:53 +00:00
|
|
|
<?php
|
|
|
|
/*
|
|
|
|
$Id: ftp_list.php,v 1.5 2003/06/10 13:16:11 root 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: List ftp accounts of the user.
|
|
|
|
----------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
require_once("../class/config.php");
|
2009-09-08 05:29:38 +00:00
|
|
|
include_once("head.php");
|
|
|
|
|
|
|
|
$fields = array (
|
|
|
|
"domain" => array ("request", "string", ""),
|
|
|
|
);
|
|
|
|
getFields($fields);
|
2006-04-26 12:28:53 +00:00
|
|
|
|
|
|
|
$noftp=false;
|
|
|
|
if (!$r=$ftp->get_list($domain)) {
|
|
|
|
$noftp=true;
|
|
|
|
$error=$err->errstr();
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|
|
|
|
<h3><?php __("FTP accounts list"); ?></h3>
|
2010-05-02 05:34:36 +00:00
|
|
|
<hr id="topbar"/>
|
|
|
|
<br />
|
2010-04-28 23:58:29 +00:00
|
|
|
|
|
|
|
<?php
|
2012-04-06 10:10:36 +00:00
|
|
|
if (isset($error) && $error && !$noftp) {
|
2010-04-28 23:58:29 +00:00
|
|
|
?>
|
|
|
|
<p class="error"><?php echo $error ?></p>
|
|
|
|
<?php } ?>
|
|
|
|
|
|
|
|
<?php if ($quota->cancreate("ftp")) { ?>
|
|
|
|
<p>
|
|
|
|
<span class="inb"><a href="ftp_add.php"><?php __("Create a new ftp account"); ?></a></span>
|
|
|
|
</p>
|
|
|
|
<?php } ?>
|
|
|
|
|
2006-04-26 12:28:53 +00:00
|
|
|
<?php
|
|
|
|
if ($noftp) {
|
|
|
|
?>
|
|
|
|
<?php $mem->show_help("ftp_list_no"); ?>
|
|
|
|
<?php
|
2010-04-28 23:58:29 +00:00
|
|
|
include_once("foot.php");
|
|
|
|
}
|
2006-04-26 12:28:53 +00:00
|
|
|
?>
|
2010-04-28 23:58:29 +00:00
|
|
|
|
2006-04-26 12:28:53 +00:00
|
|
|
<form method="post" action="ftp_del.php">
|
2010-04-28 23:58:29 +00:00
|
|
|
<table class="tlist">
|
2011-02-09 08:37:23 +00:00
|
|
|
<tr><th colspan="2"> </th><th><?php __("Username"); ?></th><th><?php __("Folder"); ?></th></tr>
|
2006-04-26 12:28:53 +00:00
|
|
|
<?php
|
|
|
|
reset($r);
|
|
|
|
$col=1;
|
|
|
|
while (list($key,$val)=each($r))
|
|
|
|
{
|
|
|
|
$col=3-$col;
|
|
|
|
?>
|
2009-09-08 05:29:38 +00:00
|
|
|
<tr class="lst<?php echo $col; ?>">
|
|
|
|
<td align="center"><input type="checkbox" class="inc" id="del_<?php echo $val["id"]; ?>" name="del_<?php echo $val["id"]; ?>" value="<?php echo $val["id"]; ?>" /></td>
|
2010-04-28 23:58:29 +00:00
|
|
|
<td><div class="ina"><a href="ftp_edit.php?id=<?php echo $val["id"] ?>"><img src="images/edit.png" alt="<?php __("Edit"); ?>" /><?php __("Edit"); ?></a></div></td>
|
|
|
|
|
2012-08-23 17:01:13 +00:00
|
|
|
<td><label for="del_<?php echo $val["id"]; ?>"><?php echo $val["login"] ?></label>
|
|
|
|
<input type='hidden' name='names[<?php echo $val['id'];?>]' value='<?php echo $val["login"] ?>' >
|
|
|
|
</td>
|
2012-09-07 09:01:14 +00:00
|
|
|
<td><code><?php echo substr(str_replace(ALTERNC_HTML,'',$val["dir"]),strlen($mem->user['login'])+3) ?></code></td>
|
2009-09-08 05:29:38 +00:00
|
|
|
</tr>
|
2006-04-26 12:28:53 +00:00
|
|
|
<?php
|
|
|
|
}
|
|
|
|
?>
|
2009-09-08 05:29:38 +00:00
|
|
|
<tr><td colspan="5"><input type="submit" name="submit" class="inb" value="<?php __("Delete checked accounts"); ?>" /></td></tr>
|
|
|
|
</table>
|
2006-04-26 12:28:53 +00:00
|
|
|
</form>
|
2009-09-08 05:29:38 +00:00
|
|
|
|
2010-04-28 23:58:29 +00:00
|
|
|
<?php
|
2009-09-08 05:29:38 +00:00
|
|
|
$mem->show_help("ftp_list");
|
|
|
|
?>
|
|
|
|
<?php include_once("foot.php"); ?>
|